triptracker.testing.compress
Class CompressedBlockOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
triptracker.testing.compress.CompressedBlockOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class CompressedBlockOutputStream
- extends FilterOutputStream
Constructor Summary |
CompressedBlockOutputStream(OutputStream os,
int size)
Constructs a CompressedBlockOutputStream that writes to the given
underlying output stream 'os' and sends a compressed block once 'size'
byte have been written. |
CompressedBlockOutputStream(OutputStream os,
int size,
int level,
int strategy)
Constructs a CompressedBlockOutputStream that writes to the given
underlying output stream 'os' and sends a compressed block once 'size'
byte have been written. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompressedBlockOutputStream
public CompressedBlockOutputStream(OutputStream os,
int size)
throws IOException
- Constructs a CompressedBlockOutputStream that writes to the given
underlying output stream 'os' and sends a compressed block once 'size'
byte have been written. The default compression strategy and level are
used.
- Throws:
IOException
CompressedBlockOutputStream
public CompressedBlockOutputStream(OutputStream os,
int size,
int level,
int strategy)
throws IOException
- Constructs a CompressedBlockOutputStream that writes to the given
underlying output stream 'os' and sends a compressed block once 'size'
byte have been written. The compression level and strategy should be
specified using the constants defined in java.util.zip.Deflator.
- Throws:
IOException
compressAndSend
protected void compressAndSend()
throws IOException
- Throws:
IOException
write
public void write(int b)
throws IOException
- Overrides:
write
in class FilterOutputStream
- Throws:
IOException
write
public void write(byte[] b,
int boff,
int blen)
throws IOException
- Overrides:
write
in class FilterOutputStream
- Throws:
IOException
flush
public void flush()
throws IOException
- Specified by:
flush
in interface Flushable
- Overrides:
flush
in class FilterOutputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class FilterOutputStream
- Throws:
IOException
Copyright © 2006 Team Trip Tracker. All Rights Reserved.