EscPosEncoder { public static byte[] qrCodeModule(byte module) { return encode(QRCODE_PREFIX, new byte[] { 0x31, 0x43 }, new byte[] { module }); }  static byte[] encodeLength(int length); static byte[] qrCodeModule(byte module); static byte[] qrCodeCorrection(CorrectionLevel cl); static byte[] qrCodeStore(String data); static byte[] qrCodePrint();  }
@Test public void itShouldEncodeModule() throws Exception { assertArrayEquals(new byte[] { (byte)0x1D, (byte)0x28, (byte)0x6B, (byte)0x03, (byte)0x00, (byte)0x31, (byte)0x43, (byte)0x04 }, EscPosEncoder.qrCodeModule((byte)4)); }