@Test public void testThirdBitmapPack() throws Exception { byte[] b = ISOUtil.hex2byte("F23C04800AE00000"+"8000000000000108"+"63BC780000000010"); BitSet bs1 = ISOUtil.byte2BitSet(b, 0, 192); ISOBitMap bmap = new ISOBitMap(-1); bmap.setValue(bs1); IFA_BITMAP ifa = new IFA_BITMAP(24, "BITMAP"); byte[] b1 = ifa.pack(bmap); assertEquals (ISOUtil.hexString(b), new String(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.hexString(ISOUtil.bitSet2byte (b, len)).getBytes(); }
IFA_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.hexString(ISOUtil.bitSet2byte (b, len)).getBytes(); } }
IFA_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.hexString(ISOUtil.bitSet2byte (b, len)).getBytes(); } IFA_BITMAP();  IFA_BITMAP(int len, String description); }
IFA_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.hexString(ISOUtil.bitSet2byte (b, len)).getBytes(); } IFA_BITMAP();  IFA_BITMAP(int len, String description); byte[] pack(ISOComponent c); int getMaxPackedLength(); int unpack(ISOComponent c, byte[] b, int offset); void unpack(ISOComponent c, InputStream in); }
IFA_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.hexString(ISOUtil.bitSet2byte (b, len)).getBytes(); } IFA_BITMAP();  IFA_BITMAP(int len, String description); byte[] pack(ISOComponent c); int getMaxPackedLength(); int unpack(ISOComponent c, byte[] b, int offset); void unpack(ISOComponent c, InputStream in);  }