public class ContentLengthStream extends StreamImpl
_nullPath, _path| Constructor and Description |
|---|
ContentLengthStream() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead()
Returns true if this is a read stream.
|
int |
getAvailable()
Returns the number of bytes available without blocking.
|
int |
read(byte[] buffer,
int offset,
int length)
Reads from the buffer, limiting to the content length.
|
java.lang.String |
toString() |
canWrite, clearWrite, close, closeWrite, flush, flushBuffer, flushToDisk, getAttribute, getAttributeNames, getFlushOnNewline, getNewline, getPath, getReadBuffer, getReadPosition, hasSkip, isClosed, isEof, isMmapEnabled, isSendfileEnabled, readNonBlock, readTimeout, removeAttribute, seekEnd, seekStart, setAttribute, setPath, setWriteEncoding, skip, write, write, writeMmap, writeSendfilepublic boolean canRead()
StreamImplcanRead in class StreamImplpublic int read(byte[] buffer,
int offset,
int length)
throws java.io.IOException
read in class StreamImplbuffer - the buffer containing the results.offset - the offset into the result bufferlength - the length of the buffer.java.io.IOExceptionpublic int getAvailable()
throws java.io.IOException
StreamImplgetAvailable in class StreamImpljava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Object