@Test public void testAztecWriter() throws Exception { testWriter("\u20AC 1 sample data.", "ISO-8859-1", 25, true, 2); testWriter("\u20AC 1 sample data.", "ISO-8859-15", 25, true, 2); testWriter("\u20AC 1 sample data.", "UTF-8", 25, true, 2); testWriter("\u20AC 1 sample data.", "UTF-8", 100, true, 3); testWriter("\u20AC 1 sample data.", "UTF-8", 300, true, 4); testWriter("\u20AC 1 sample data.", "UTF-8", 500, false, 5); String data = "In ut magna vel mauris malesuada"; AztecWriter writer = new AztecWriter(); BitMatrix matrix = writer.encode(data, BarcodeFormat.AZTEC, 0, 0); AztecCode aztec = Encoder.encode(data.getBytes(StandardCharsets.ISO_8859_1), Encoder.DEFAULT_EC_PERCENT, Encoder.DEFAULT_AZTEC_LAYERS); BitMatrix expectedMatrix = aztec.getMatrix(); assertEquals(matrix, expectedMatrix); }
public static AztecCode encode(byte[] data) { return encode(data, DEFAULT_EC_PERCENT, DEFAULT_AZTEC_LAYERS); }
Encoder { public static AztecCode encode(byte[] data) { return encode(data, DEFAULT_EC_PERCENT, DEFAULT_AZTEC_LAYERS); } }
Encoder { public static AztecCode encode(byte[] data) { return encode(data, DEFAULT_EC_PERCENT, DEFAULT_AZTEC_LAYERS); } private  Encoder(); }
Encoder { public static AztecCode encode(byte[] data) { return encode(data, DEFAULT_EC_PERCENT, DEFAULT_AZTEC_LAYERS); } private  Encoder(); static AztecCode encode(byte[] data); static AztecCode encode(byte[] data, int minECCPercent, int userSpecifiedLayers); }
Encoder { public static AztecCode encode(byte[] data) { return encode(data, DEFAULT_EC_PERCENT, DEFAULT_AZTEC_LAYERS); } private  Encoder(); static AztecCode encode(byte[] data); static AztecCode encode(byte[] data, int minECCPercent, int userSpecifiedLayers); static final int DEFAULT_EC_PERCENT; static final int DEFAULT_AZTEC_LAYERS; }