@Test public void testUnpackThrowsNullPointerException() throws Throwable { Base1_BITMAP126 base1_BITMAP126 = new Base1_BITMAP126(100, "testBase1_BITMAP126Description"); ISOComponent c = new ISOBinaryField(100); try { base1_BITMAP126.unpack(c, null, 100); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot load from byte/boolean array because \"b\" is null", ex.getMessage(), "ex.getMessage()"); } assertNull(((ISOBinaryField) c).getBytes(), "(ISOBinaryField) c.getBytes()"); } }
public int unpack (ISOComponent c, byte[] b, int offset) throws ISOException { int len; BitSet bmap = ISOUtil.byte2BitSet (b, offset, false); c.setValue(bmap); len = (len=bmap.size()) > 128 ? 128 : len; return len >> 3; }
Base1_BITMAP126 extends ISOBitMapPackager { public int unpack (ISOComponent c, byte[] b, int offset) throws ISOException { int len; BitSet bmap = ISOUtil.byte2BitSet (b, offset, false); c.setValue(bmap); len = (len=bmap.size()) > 128 ? 128 : len; return len >> 3; } }
Base1_BITMAP126 extends ISOBitMapPackager { public int unpack (ISOComponent c, byte[] b, int offset) throws ISOException { int len; BitSet bmap = ISOUtil.byte2BitSet (b, offset, false); c.setValue(bmap); len = (len=bmap.size()) > 128 ? 128 : len; return len >> 3; } Base1_BITMAP126();  Base1_BITMAP126(int len, String description); }
Base1_BITMAP126 extends ISOBitMapPackager { public int unpack (ISOComponent c, byte[] b, int offset) throws ISOException { int len; BitSet bmap = ISOUtil.byte2BitSet (b, offset, false); c.setValue(bmap); len = (len=bmap.size()) > 128 ? 128 : len; return len >> 3; } Base1_BITMAP126();  Base1_BITMAP126(int len, String description); byte[] pack(ISOComponent c); int unpack(ISOComponent c, byte[] b, int offset); int getMaxPackedLength(); }
Base1_BITMAP126 extends ISOBitMapPackager { public int unpack (ISOComponent c, byte[] b, int offset) throws ISOException { int len; BitSet bmap = ISOUtil.byte2BitSet (b, offset, false); c.setValue(bmap); len = (len=bmap.size()) > 128 ? 128 : len; return len >> 3; } Base1_BITMAP126();  Base1_BITMAP126(int len, String description); byte[] pack(ISOComponent c); int unpack(ISOComponent c, byte[] b, int offset); int getMaxPackedLength();  }