msg.java

来自「java开源的企业总线.xmlBlaster」· Java 代码 · 共 55 行

JAVA
55
字号
/*------------------------------------------------------------------------------Name:      Msg.javaProject:   xmlBlaster.orgCopyright: xmlBlaster.org, see xmlBlaster-LICENSE file------------------------------------------------------------------------------*/package org.xmlBlaster.client.protocol.http.common;import java.util.Hashtable;/** * Encapsulates the xmlKey, content and qos.  */public final class Msg{   private transient static final Hashtable EMPTY_MAP = new Hashtable();   private transient static final byte[] EMPTY_BYTEARR = new byte[0];   private final Hashtable qos;   private final Hashtable key;   private final byte[] content;   public Msg(Hashtable key, byte[] content, Hashtable qos) {      this.qos = (qos == null) ? EMPTY_MAP : qos;      this.key = (key == null) ? EMPTY_MAP : key;      this.content = (content == null) ? EMPTY_BYTEARR : content;   }   /**    * The message key, never null    */   public Hashtable getKey() {      return this.key;   }   /**    * Get the raw content, never null    */   public byte[] getContent() {      return this.content;   }   /**    * Get the raw content, never null    */   public String getContentStr() {      return new String(this.content);   }   /**    * The message QoS, never null    */   public Hashtable getQos() {      return this.qos;   }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?