()
| 194 | } |
| 195 | |
| 196 | @Override |
| 197 | public void close() throws IOException { |
| 198 | if (closed) { |
| 199 | return; |
| 200 | } |
| 201 | closed = true; |
| 202 | try { |
| 203 | encode(EncoderJNI.Operation.FINISH); |
| 204 | } finally { |
| 205 | encoder.destroy(); |
| 206 | destination.close(); |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | /** Encodes the given data buffer. */ |
| 211 | public static byte[] compress(byte[] data, int offset, int length, Parameters params) |