public int getMaxPackedLength() { return getLength()+2; } }
public void unpack (ISOComponent c, InputStream in) throws IOException, ISOException { byte[] b = readBytes (in, 2); int len = 100 * (((b[0] >> 4 & 0x0F) > 0x09 ? 0 : b[0] >> 4 & 0x0F) * 10 + (b[0] & 0x0F)) + ((b[1] >> 4 & 0x0F) > 0x09 ? 0 : b[1] >> 4 & 0x0F) * 10 + (b[1] & 0x0F); c.setValue (ISOUtil.bcd2str (readBytes (in, len), 0, 2*len, pad)); }
String s = (String) c.getValue(); if ((len=s.length()) > getLength() || len>99) // paranoia settings throw new ISOException( "invalid len "+len +" packing IFEB_LLNUM field "+ c.getKey());