| 29 | } |
| 30 | |
| 31 | private static class PreparedDictionaryImpl implements AutoCloseable, PreparedDictionary { |
| 32 | private ByteBuffer data; |
| 33 | /** Reference to (non-copied) LZ data. */ |
| 34 | private ByteBuffer rawData; |
| 35 | |
| 36 | private PreparedDictionaryImpl(ByteBuffer data, ByteBuffer rawData) { |
| 37 | this.data = data; |
| 38 | } |
| 39 | |
| 40 | @Override |
| 41 | public ByteBuffer getData() { |
| 42 | return data; |
| 43 | } |
| 44 | |
| 45 | @Override |
| 46 | public void close() { |
| 47 | ByteBuffer data = this.data; |
| 48 | this.data = null; |
| 49 | this.rawData = null; |
| 50 | nativeDestroyDictionary(data); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Prepares raw or serialized dictionary for being used by encoder. |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…