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.IOExceptionpublic void write(byte[] buf,
int offset,
int length)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void write(byte[] buf)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic boolean abort()
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterOutputStreamjava.io.IOException