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, flush
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(int b) throws IOException
write
in class OutputStream
IOException
public ArrayList buffers()
public int length()
public long receive(InputStream is, long maxRead) throws IOException
is
- InputStream containing datamaxRead
- the maximum number of bytes to receiveIOException
public long readFrom(InputStream is, long maxRead) throws StreamCopyException
ReadFromSupport
length
argument is different from -1
and the number of bytes transferred is equal to length
.
readFrom
in interface ReadFromSupport
is
- 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 reachedStreamCopyException
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.