@Test public void testEncodeSingle() throws Exception { byte[] single = encoder.encodeSingle(new UriRecord( "http: + "khjaljhsldfkjhasldfkhjaljhsldfkjhasldfkhjaljhsldfkjhasldfkhjaljhsldfkjhasldfkhjal" + "jhsldfkjhasldfkhjaljhsldfkjhasldfkhjaljhsldfkjhasldfkhjaljhsldfkjhasldfkhjaljhsldf" + "kjhasldfkhjaljhsldfkjhasldfkhjaljhsldfkjhasldfkhjaljhsldfkjhasldfkhj")); assertEquals("C1010000011B5501766572796C6F6E6775726C2E636F6D2F616C6A68736C64666B6A6861736C6466" + "6B686A616C6A68736C64666B6A6861736C64666B686A616C6A68736C64666B6A6861736C64666B68" + "6A616C6A68736C64666B6A6861736C64666B686A616C6A68736C64666B6A6861736C64666B686A61" + "6C6A68736C64666B6A6861736C64666B686A616C6A68736C64666B6A6861736C64666B686A616C6A" + "68736C64666B6A6861736C64666B686A616C6A68736C64666B6A6861736C64666B686A616C6A6873" + "6C64666B6A6861736C64666B686A616C6A68736C64666B6A6861736C64666B686A616C6A68736C64" + "666B6A6861736C64666B686A616C6A68736C64666B6A6861736C64666B686A616C6A68736C64666B" + "6A6861736C64666B686A", NfcUtils.convertBinToASCII(single)); }
public byte[] encodeSingle(Record record) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); encodeSingle(record, baos); return baos.toByteArray(); }
NdefMessageEncoder { public byte[] encodeSingle(Record record) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); encodeSingle(record, baos); return baos.toByteArray(); } }
NdefMessageEncoder { public byte[] encodeSingle(Record record) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); encodeSingle(record, baos); return baos.toByteArray(); } NdefMessageEncoder(NdefRecordEncoder ndefRecordEncoder); }
NdefMessageEncoder { public byte[] encodeSingle(Record record) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); encodeSingle(record, baos); return baos.toByteArray(); } NdefMessageEncoder(NdefRecordEncoder ndefRecordEncoder); byte[] encodeSingle(Record record); void encodeSingle(Record record, ByteArrayOutputStream out); byte[] encode(Record... records); byte[] encode(Iterable<? extends Record> records); void encode(Iterable<? extends Record> records, ByteArrayOutputStream baos); }
NdefMessageEncoder { public byte[] encodeSingle(Record record) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); encodeSingle(record, baos); return baos.toByteArray(); } NdefMessageEncoder(NdefRecordEncoder ndefRecordEncoder); byte[] encodeSingle(Record record); void encodeSingle(Record record, ByteArrayOutputStream out); byte[] encode(Record... records); byte[] encode(Iterable<? extends Record> records); void encode(Iterable<? extends Record> records, ByteArrayOutputStream baos);  }