public class BAAOutputStream extends OutputStream implements ReadFromSupport
| Constructor and Description |
|---|
BAAOutputStream() |
| Modifier and Type | Method and Description |
|---|---|
ArrayList |
buffers() |
int |
length() |
long |
readFrom(InputStream is,
long maxRead)
Read data from the given input stream and write it to this output stream.
|
long |
receive(InputStream is,
long maxRead) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
close, flushpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic ArrayList buffers()
public int length()
public long receive(InputStream is, long maxRead) throws IOException
is - InputStream containing datamaxRead - the maximum number of bytes to receiveIOExceptionpublic long readFrom(InputStream is, long maxRead) throws StreamCopyException
ReadFromSupportlength argument is different from -1
and the number of bytes transferred is equal to length.
readFrom in interface ReadFromSupportis - An input stream to read data from. This method will not close the stream.maxRead - the number of bytes to transfer, or -1 if the method should
transfer data until the end of the input stream is reachedStreamCopyExceptionCopyright © The Apache Software Foundation. All Rights Reserved.