44454647484950
public void testSimpleUsingByteArray() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); new SimpleBytesTrieBuilder(new MapReader(TEST_ENTRIES)).buildAndWrite(out, false); byte[] raw = out.toByteArray(); _testSimple(new ByteArrayBytesTrieLookup(raw)); }
87888990919293
* Method for constructing byte[] ("bytes") valued tries, using * raw byte array as is for lookup. */ public static BytesTrieLookup constructByteArrayBytesTrie(byte[] raw) { return new ByteArrayBytesTrieLookup(raw); }
204205206207208209210
{ TrieHeader header = _readHeader(in, true); int len = (int) header.getPayloadLength(); byte[] buffer = new byte[len]; InputUtil.readFully(in, buffer, 0, len); return new ByteArrayBytesTrieLookup(buffer); }