@Test public void testThirdBitmapPack() throws Exception { byte[] b = ISOUtil.hex2byte("F23C04800AE00000800000000000010863BC780000000010"); BitSet bs1 = ISOUtil.byte2BitSet(b, 0, 192); ISOBitMap bmap = new ISOBitMap(-1); bmap.setValue(bs1); IFB_BITMAP ifb = new IFB_BITMAP(24, "BITMAP"); byte[] b1 = ifb.pack(bmap); assertEquals (ISOUtil.hexString(b), ISOUtil.hexString(b1), "Pack should be equal to unpack"); }
public byte[] pack (ISOComponent c) throws ISOException { BitSet b = (BitSet) c.getValue(); int len = getLength() >= 8 ? b.length()+62 >>6 <<3 : getLength(); return ISOUtil.bitSet2byte (b, len); }
IFB_BITMAP extends ISOBitMapPackager { public byte[] pack (ISOComponent c) throws ISOException { BitSet b = (BitSet) c.getValue(); int len = getLength() >= 8 ? b.length()+62 >>6 <<3 : getLength(); return ISOUtil.bitSet2byte (b, len); } }
IFB_BITMAP extends ISOBitMapPackager { public byte[] pack (ISOComponent c) throws ISOException { BitSet b = (BitSet) c.getValue(); int len = getLength() >= 8 ? b.length()+62 >>6 <<3 : getLength(); return ISOUtil.bitSet2byte (b, len); } IFB_BITMAP();  IFB_BITMAP(int len, String description); }
IFB_BITMAP extends ISOBitMapPackager { public byte[] pack (ISOComponent c) throws ISOException { BitSet b = (BitSet) c.getValue(); int len = getLength() >= 8 ? b.length()+62 >>6 <<3 : getLength(); return ISOUtil.bitSet2byte (b, len); } IFB_BITMAP();  IFB_BITMAP(int len, String description); byte[] pack(ISOComponent c); int unpack(ISOComponent c, byte[] b, int offset); void unpack(ISOComponent c, InputStream in); int getMaxPackedLength(); }
IFB_BITMAP extends ISOBitMapPackager { public byte[] pack (ISOComponent c) throws ISOException { BitSet b = (BitSet) c.getValue(); int len = getLength() >= 8 ? b.length()+62 >>6 <<3 : getLength(); return ISOUtil.bitSet2byte (b, len); } IFB_BITMAP();  IFB_BITMAP(int len, String description); byte[] pack(ISOComponent c); int unpack(ISOComponent c, byte[] b, int offset); void unpack(ISOComponent c, InputStream in); int getMaxPackedLength();  }