@Test public void testInterpretThrowsNullPointerException() throws Throwable { assertThrows(NullPointerException.class, () -> { BCDInterpreter.LEFT_PADDED.interpret("testBCDInterpreterData", null, 100); }); }
public void interpret(String data, byte[] b, int offset) { ISOUtil.str2bcd(data, leftPadded, b, offset); int paddedSize = data.length() >> 1; if (fPadded && data.length()%2 == 1) if (leftPadded) b[offset] |= (byte) 0xF0; else b[offset+paddedSize] |= (byte) 0x0F; }
BCDInterpreter implements Interpreter { public void interpret(String data, byte[] b, int offset) { ISOUtil.str2bcd(data, leftPadded, b, offset); int paddedSize = data.length() >> 1; if (fPadded && data.length()%2 == 1) if (leftPadded) b[offset] |= (byte) 0xF0; else b[offset+paddedSize] |= (byte) 0x0F; } }
BCDInterpreter implements Interpreter { public void interpret(String data, byte[] b, int offset) { ISOUtil.str2bcd(data, leftPadded, b, offset); int paddedSize = data.length() >> 1; if (fPadded && data.length()%2 == 1) if (leftPadded) b[offset] |= (byte) 0xF0; else b[offset+paddedSize] |= (byte) 0x0F; } private  BCDInterpreter(boolean leftPadded, boolean fPadded); }
BCDInterpreter implements Interpreter { public void interpret(String data, byte[] b, int offset) { ISOUtil.str2bcd(data, leftPadded, b, offset); int paddedSize = data.length() >> 1; if (fPadded && data.length()%2 == 1) if (leftPadded) b[offset] |= (byte) 0xF0; else b[offset+paddedSize] |= (byte) 0x0F; } private  BCDInterpreter(boolean leftPadded, boolean fPadded); void interpret(String data, byte[] b, int offset); String uninterpret(byte[] rawData, int offset, int length); int getPackedLength(int nDataUnits); }
BCDInterpreter implements Interpreter { public void interpret(String data, byte[] b, int offset) { ISOUtil.str2bcd(data, leftPadded, b, offset); int paddedSize = data.length() >> 1; if (fPadded && data.length()%2 == 1) if (leftPadded) b[offset] |= (byte) 0xF0; else b[offset+paddedSize] |= (byte) 0x0F; } private  BCDInterpreter(boolean leftPadded, boolean fPadded); void interpret(String data, byte[] b, int offset); String uninterpret(byte[] rawData, int offset, int length); int getPackedLength(int nDataUnits); static final BCDInterpreter LEFT_PADDED; static final BCDInterpreter RIGHT_PADDED; static final BCDInterpreter RIGHT_PADDED_F; static final BCDInterpreter LEFT_PADDED_F; }