示例#1
0
 protected void writeHeader(ObjectOutput out) throws IOException {
   int len = header.getLength();
   if (len > 0) {
     out.writeByte('H');
     out.writeShort(len);
     out.write(header.pack());
   }
 }
示例#2
0
  public Object clone() {
    try {
      ISOMsg m = (ISOMsg) super.clone();
      m.fields = (TreeMap) ((TreeMap) fields).clone();
      if (header != null) m.header = (ISOHeader) header.clone();

      Iterator iter = fields.keySet().iterator();
      while (iter.hasNext()) {
        Integer k = (Integer) iter.next();
        ISOComponent c = (ISOComponent) m.fields.get(k);
        if (c instanceof ISOMsg) m.fields.put(k, ((ISOMsg) c).clone());
      }
      return m;
    } catch (CloneNotSupportedException e) {
      throw new InternalError();
    }
  }
示例#3
0
 /**
  * get optional message header image
  *
  * @return message header image (may be null)
  */
 public byte[] getHeader() {
   return (header != null) ? header.pack() : null;
 }