public interface ReadFromSupport
OutputStream
implementations that support
transferring data from an InputStream
. This interface may be used to avoid allocating
a temporary buffer when there is a need to copy data from an input stream to an output stream.Modifier and Type | Method and Description |
---|---|
long |
readFrom(InputStream inputStream,
long length)
Read data from the given input stream and write it to this output stream.
|
long readFrom(InputStream inputStream, long length) throws StreamCopyException
length
argument is different from -1
and the number of bytes transferred is equal to length
.
inputStream
- An input stream to read data from. This method will not close the stream.length
- 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.