public class LzoOutputStream extends OutputStream
Modifier and Type | Field and Description |
---|---|
protected OutputStream |
out |
Constructor and Description |
---|
LzoOutputStream(OutputStream out)
Creates a new compressor with the default lzo1x_1 compression.
|
LzoOutputStream(OutputStream out,
LzoCompressor compressor)
Creates a new compressor with the specified compression.
|
LzoOutputStream(OutputStream out,
LzoCompressor compressor,
int inputBufferSize)
Creates a new compressor using the specified
LzoCompressor . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
LzoAlgorithm |
getAlgorithm() |
LzoCompressor |
getCompressor() |
LzoConstraint[] |
getConstraints() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
protected void |
writeBlock(byte[] inputData,
int inputPos,
int inputLen,
byte[] outputData,
int outputPos,
int outputLen) |
protected void |
writeInt(int v) |
protected final OutputStream out
public LzoOutputStream(@Nonnull OutputStream out, @Nonnull LzoCompressor compressor, @CheckForSigned int inputBufferSize)
LzoCompressor
.compressor
- lzo compression algorithm to useinputBufferSize
- size of the buffers to be used. If <0, uses the default 64K.public LzoOutputStream(@Nonnull OutputStream out, @Nonnull LzoCompressor compressor)
public LzoOutputStream(@Nonnull OutputStream out)
@Nonnull public LzoCompressor getCompressor()
@Nonnull public LzoAlgorithm getAlgorithm()
@Nonnull public LzoConstraint[] getConstraints()
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
protected void writeBlock(@Nonnull byte[] inputData, @Nonnegative int inputPos, @Nonnegative int inputLen, @Nonnull byte[] outputData, @Nonnegative int outputPos, @Nonnegative int outputLen) throws IOException
IOException
protected void writeInt(int v) throws IOException
IOException