public class HttpProxyStreamImpl extends StreamImpl
_nullPath, _path
Constructor and Description |
---|
HttpProxyStreamImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead()
Returns true if this is a read stream.
|
boolean |
canWrite()
Returns true if this is a writable stream.
|
void |
closeWrite()
Closes the write half of the stream.
|
int |
getAvailable()
Returns the number of bytes available without blocking.
|
void |
init(java.io.InputStream is,
java.io.OutputStream os) |
int |
read(byte[] buffer,
int offset,
int length)
Reads the next chunk from the stream.
|
void |
write(byte[] buffer,
int offset,
int length,
boolean isEnd)
Writes a buffer to the underlying stream.
|
clearWrite, close, 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, writeMmap, writeSendfile
public void init(java.io.InputStream is, java.io.OutputStream os)
public boolean canRead()
StreamImpl
canRead
in class StreamImpl
public int getAvailable() throws java.io.IOException
StreamImpl
getAvailable
in class StreamImpl
java.io.IOException
public int read(byte[] buffer, int offset, int length) throws java.io.IOException
StreamImpl
read
in class StreamImpl
buffer
- byte array receiving the data.offset
- starting offset into the array.length
- number of bytes to read.java.io.IOException
public boolean canWrite()
StreamImpl
canWrite
in class StreamImpl
public void write(byte[] buffer, int offset, int length, boolean isEnd) throws java.io.IOException
StreamImpl
write
in class StreamImpl
buffer
- the byte array to write.offset
- the offset into the byte array.length
- the number of bytes to write.isEnd
- true when the write is flushing a close.java.io.IOException
public void closeWrite() throws java.io.IOException
StreamImpl
closeWrite
in class StreamImpl
java.io.IOException