/** * Closes this stream and any underlying streams. */ @Override public void close() throws IOException { eos = true; super.close(); }
@Override public void close() throws IOException { super.close(); inflater.end(); } };
@Override public void close() throws IOException { try { inflaterInputStream.close(); } finally { inflater.end(); } } }
@Override public void close() throws IOException { super.close(); inflater.end(); } };
@Override public void close() throws IOException { super.close(); inflater.end(); } };
/** * Closes this {@code ZipInputStream}. * * @throws IOException * if an {@code IOException} occurs. */ @Override public void close() throws IOException { if (!closed) { closeEntry(); // Close the current entry super.close(); } }
@Override public void close() throws IOException { Hessian2Input in = _in; _in = null; if (in != null) { _inflateIn.close(); _bodyIn.close(); int len = in.readInt(); if (len != 0) throw new IOException("Unexpected footer"); in.completeEnvelope(); in.close(); } } }
public byte[] decompress(byte[] in) throws IOException { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ByteArrayInputStream bais = new ByteArrayInputStream(in); final InflaterInputStream gz = new InflaterInputStream(bais); int read; while ((read = gz.read()) != -1) { baos.write(read); } gz.close(); bais.close(); baos.close(); return baos.toByteArray(); }
inflaterInputStream.close(); } catch (IOException e) { log.error("Failed to close the stream", e);
try { if (reader != null) { reader.close();
inflater.close();
public static byte[] inflate(byte[] input, int bufferSize) throws IOException { ByteArrayInputStream in = new ByteArrayInputStream(input); Inflater inf = new Inflater(); InflaterInputStream iis = new InflaterInputStream(in, inf, bufferSize); ByteArrayOutputStream out = new ByteArrayOutputStream(input.length * 5); for (int c = iis.read(); c != -1; c = iis.read()) { out.write(c); } in.close(); iis.close(); byte[] ret = out.toByteArray(); out.close(); return ret; }
/** * Decompresses the specified byte array according to the DEFLATE * specification (RFC 1951). * * @param bytes The byte array to decompress. Must not be {@code null}. * * @return The decompressed bytes. * * @throws java.io.IOException If decompression failed. */ public static byte[] decompress(final byte[] bytes) throws IOException { InflaterInputStream inf = new InflaterInputStream(new ByteArrayInputStream(bytes), new Inflater(NOWRAP)); ByteArrayOutputStream out = new ByteArrayOutputStream(); // Transfer bytes from the compressed array to the output byte[] buf = new byte[1024]; int len; while ((len = inf.read(buf)) > 0) { out.write(buf, 0, len); } inf.close(); out.close(); return out.toByteArray(); }
@Override public void close() throws IOException { try { if (remaining <= 0) checkValidEndOfStream(in, inf, id, new byte[64]); } finally { InflaterCache.release(inf); super.close(); } } };
inflaterInputStream.close(); } catch (IOException e) { log.error("Failed to close the stream", e);
public void close() throws IOException { Hessian2Input in = _in; _in = null; if (in != null) { _inflateIn.close(); _bodyIn.close(); int len = in.readInt(); if (len != 0) { throw new IOException("Unexpected footer"); } in.completeEnvelope(); in.close(); } } }
public void close() throws IOException { Hessian2Input in = _in; _in = null; if (in != null) { _inflateIn.close(); _bodyIn.close(); int len = in.readInt(); if (len != 0) { throw new IOException("Unexpected footer"); } in.completeEnvelope(); in.close(); } } }
InflaterInputStream inflateStream = new InflaterInputStream(new ByteArrayInputStream(compressedProfile)); new IccReader().extract(new RandomAccessStreamReader(inflateStream), metadata, directory); inflateStream.close(); } catch(java.util.zip.ZipException zex) { directory.addError(String.format("Exception decompressing PNG iCCP chunk : %s", zex.getMessage()));
} finally { try { iis.close(); } catch (IOException e) {
} finally { try { iis.close(); } catch (IOException e) {