public void finish() throws IOException { // Finish the Compressed Data field. filterChain.finish(); validate(); // Block Padding for (long i = outCounted.getSize(); (i & 3) != 0; ++i) out.write(0x00); // Check out.write(check.finish()); }
public void flush() throws IOException { filterChain.flush(); validate(); }
public void write(byte[] buf, int off, int len) throws IOException { filterChain.write(buf, off, len); check.update(buf, off, len); uncompressedSize += len; validate(); }
public void close() throws IOException { writeEndMarker(); out.close(); }
public void finish() throws IOException { writeEndMarker(); out.finish(); }
private void writeEndMarker() throws IOException { // TODO: Flush incomplete chunk. out.write(0x00); }
private void writeChunk(byte[] buf, int off, int len) throws IOException { out.write(0x01); out.write((len - 1) >>> 8); out.write(len - 1); out.write(buf, off, len); }