@Override public void setValue(final Object obj) throws ISOException { delegate.setValue(obj); }
/** * @param c - the Component to unpack * @param b - binary image * @param offset - starting offset within the binary image * @return consumed bytes * @exception ISOException */ public int unpack (ISOComponent c, byte[] b, int offset) throws ISOException { int len = b[offset] & 0xFF; byte[] value = new byte[len]; System.arraycopy(b, ++offset, value, 0, len); c.setValue (value); return getLength()+1; } public void unpack (ISOComponent c, InputStream in)
/** * @param c - the Component to unpack * @param b - binary image * @param offset - starting offset within the binary image * @return consumed bytes * @exception ISOException */ public int unpack (ISOComponent c, byte[] b, int offset) throws ISOException { BitSet bmap = ISOUtil.hex2BitSet (b, offset, false); c.setValue(bmap); return bmap.size() >> 2; } public int getMaxPackedLength() {
/** * @param c - the Component to unpack * @param b - binary image * @param offset - starting offset within the binary image * @return consumed bytes * @exception ISOException */ public int unpack (ISOComponent c, byte[] b, int offset) throws ISOException { //CJH incorrect IFA_LLBINARY unpack 08/07/04 int len = Integer.parseInt(new String(b, offset, 2)); c.setValue (ISOUtil.hex2byte(b, offset + 2, len)); return len * 2 + 2; //CJH END. } public ISOComponent createComponent(int fieldNumber) {
/** * @param c - the Component to unpack * @param b - binary image * @param offset - starting offset within the binary image * @return consumed bytes * @exception ISOException */ public int unpack (ISOComponent c, byte[] b, int offset) throws ISOException { //CJH incorrect IFA_LLLBINARY unpack 08/07/04 int len = Integer.parseInt(new String(b, offset, 3)); c.setValue (ISOUtil.hex2byte(b, offset + 3, len)); return len * 2 + 3; //CJH END } public ISOComponent createComponent(int fieldNumber) {
public void unpack (ISOComponent c, InputStream in) throws IOException, ISOException { int len = Integer.parseInt(new String(readBytes (in, 3))); c.setValue (readBytes (in, len)); } }
public void unpack (ISOComponent c, InputStream in) throws IOException, ISOException { int len = Integer.parseInt(new String(readBytes (in, 2))); c.setValue (readBytes (in, len)); } }
@Override public int unpack(ISOComponent c, byte[] b, int offset) throws ISOException { byte[] tagBytes = new byte[getMaxPackedLength()]; System.arraycopy(b, offset, tagBytes, 0, tagBytes.length); c.setValue(ISOUtil.byte2hex(tagBytes)); return tagBytes.length; } }
public void unpack (ISOComponent c, InputStream in) throws IOException, ISOException { if (!(c instanceof ISOField)) throw new ISOException (c.getClass().getName() + " is not an ISOField"); int fldno = Integer.parseInt(new String(readBytes (in, 4))); int len = Integer.parseInt(new String(readBytes (in, 3))); c.setFieldNumber(fldno); c.setValue (new String (readBytes (in, len))); }
public void unpack (ISOComponent c, InputStream in) throws IOException, ISOException { if (!(c instanceof ISOField)) throw new ISOException (c.getClass().getName() + " is not an ISOField"); int len = Integer.parseInt(new String(readBytes (in, 2))); int fldno = Integer.parseInt(new String(readBytes (in, 2))); c.setFieldNumber(fldno); c.setValue (new String (readBytes (in, len-2))); }
/** * @param c - the Component to unpack * @param b - binary image * @param offset - starting offset within the binary image * @return consumed bytes * @exception ISOException */ public int unpack (ISOComponent c, byte[] b, int offset) throws ISOException { int len = prefixer.decodeLength(b, offset); c.setValue (interpreter.uninterpret(b, offset + 2, len)); return 2 + (++len >> 1); } public void unpack (ISOComponent c, InputStream in)
public void unpack (ISOComponent c, InputStream in) throws IOException, ISOException { byte[] b = readBytes (in, 1); int len = b[0] & 0xFF; c.setValue (readBytes (in, len)); in.skip (getLength () - len); } public ISOComponent createComponent(int fieldNumber) {
public void unpack (ISOComponent c, InputStream in) throws IOException, ISOException { if (!(c instanceof ISOField)) throw new ISOException (c.getClass().getName() + " is not an ISOField"); int len = Integer.parseInt(ISOUtil.ebcdicToAscii(readBytes (in, 3))) - 2; int fldno = Integer.parseInt(ISOUtil.ebcdicToAscii(readBytes (in, 2))); c.setFieldNumber (fldno); c.setValue (new String (readBytes (in, len))); }
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)); }
public void unpack (ISOComponent c, InputStream in) throws IOException, ISOException { if (!(c instanceof ISOField)) throw new ISOException (c.getClass().getName() + " is not an ISOField"); int len = Integer.parseInt(ISOUtil.ebcdicToAscii(readBytes (in, prefixerPackedLength))) - TAG_HEADER_LENGTH; int fldno = Integer.parseInt(ISOUtil.ebcdicToAscii(readBytes (in, TAG_HEADER_LENGTH))); c.setFieldNumber (fldno); c.setValue (readBytes(in, len)); } public int getMaxPackedLength() {
public void unpack (ISOComponent c, InputStream in) throws IOException, ISOException { BitSet bmap = ISOUtil.hex2BitSet (new BitSet (64), readBytes (in, 16), 0); if (getLength() > 8 && bmap.get (1)) { ISOUtil.hex2BitSet (bmap, readBytes (in, 16), 64); } c.setValue(bmap); } }
/** * @param c - the Component to unpack * @param b - binary image * @param offset - starting offset within the binary image * @return consumed bytes * @exception ISOException */ public int unpack (ISOComponent c, byte[] b, int offset) throws ISOException { c.setValue(ISOUtil.ebcdicToAscii(b, offset, getLength())); return getLength(); } public int getMaxPackedLength() {
public void unpack (ISOComponent c, InputStream in) throws IOException, ISOException { BitSet bmap = ISOUtil.byte2BitSet (new BitSet (64), readBytes (in, 8), 0); if (getLength() > 8 && bmap.get (1)) { ISOUtil.byte2BitSet (bmap, readBytes (in, 8), 64); } if (getLength() > 16 && bmap.get (65)) { ISOUtil.byte2BitSet (bmap, readBytes (in, 8), 128); } c.setValue(bmap); } public int getMaxPackedLength() {
public void unpack (ISOComponent c, InputStream in) throws IOException, ISOException { int len = prefixer.decodeLength(readBytes (in, 2), 2); c.setValue (interpreter.uninterpret(readBytes (in, len+2 >> 1), 0, len)); } public int getMaxPackedLength() {
public void unpack (ISOComponent c, InputStream in) throws IOException, ISOException { byte [] b1 = ISOUtil.ebcdicToAsciiBytes (readBytes (in, 16), 0, 16); BitSet bmap = ISOUtil.hex2BitSet (new BitSet (64), b1, 0); if (getLength() > 8 && bmap.get (1)) { byte [] b2 = ISOUtil.ebcdicToAsciiBytes (readBytes (in, 16), 0, 16); ISOUtil.hex2BitSet (bmap, b2, 64); } c.setValue(bmap); } }