コード例 #1
0
  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());
  }
コード例 #2
0
 public void flush() throws IOException {
   filterChain.flush();
   validate();
 }
コード例 #3
0
 public void write(byte[] buf, int off, int len) throws IOException {
   filterChain.write(buf, off, len);
   check.update(buf, off, len);
   uncompressedSize += len;
   validate();
 }
コード例 #4
0
ファイル: LZMA2OutputStream.java プロジェクト: AsamK/openzim
 public void close() throws IOException {
   writeEndMarker();
   out.close();
 }
コード例 #5
0
ファイル: LZMA2OutputStream.java プロジェクト: AsamK/openzim
 public void finish() throws IOException {
   writeEndMarker();
   out.finish();
 }
コード例 #6
0
ファイル: LZMA2OutputStream.java プロジェクト: AsamK/openzim
 private void writeEndMarker() throws IOException {
   // TODO: Flush incomplete chunk.
   out.write(0x00);
 }
コード例 #7
0
ファイル: LZMA2OutputStream.java プロジェクト: AsamK/openzim
 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);
 }