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, writeSendfile
public boolean canRead()
StreamImpl
canRead
in class StreamImpl
public int read(byte[] buffer, int offset, int length) throws java.io.IOException
read
in class StreamImpl
buffer
- the buffer containing the results.offset
- the offset into the result bufferlength
- the length of the buffer.java.io.IOException
public int getAvailable() throws java.io.IOException
StreamImpl
getAvailable
in class StreamImpl
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object