public class PrependLengthOutputStream
extends java.io.FilterOutputStream
Modifier and Type | Method and Description |
---|---|
boolean |
abort()
Abort the stream.
|
void |
close() |
static PrependLengthOutputStream |
create(java.io.OutputStream out,
BucketFactory bf,
int offset,
boolean closeUnderlying)
Create a stream which writes to temporary space and then on a non-aborted close() will
write the length (minus the offset) followed by the data.
|
void |
write(byte[] buf) |
void |
write(byte[] buf,
int offset,
int length) |
public static PrependLengthOutputStream create(java.io.OutputStream out, BucketFactory bf, int offset, boolean closeUnderlying) throws java.io.IOException
java.io.IOException
public void write(byte[] buf, int offset, int length) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void write(byte[] buf) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public boolean abort() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterOutputStream
java.io.IOException