public class PipeStream extends StreamImpl
_nullPath, _path
Modifier and Type | Method and Description |
---|---|
boolean |
canRead()
PipeStreams can read
|
boolean |
canWrite()
The pipe stream can write.
|
void |
close()
Closes the stream.
|
static java.lang.Object[] |
create()
Creates a pipe pair.
|
int |
getAvailable()
Return the available bytes.
|
int |
read(byte[] buf,
int offset,
int length)
Reads the available bytes if any, otherwise block.
|
void |
write(byte[] buf,
int offset,
int length,
boolean isEnd)
Implementation of the pipe write.
|
clearWrite, 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, writeMmap, writeSendfile
public static java.lang.Object[] create()
public boolean canRead()
canRead
in class StreamImpl
public int read(byte[] buf, int offset, int length) throws java.io.IOException
read
in class StreamImpl
buf
- byte array receiving the data.offset
- starting offset into the array.length
- number of bytes to read.java.io.IOException
public int getAvailable() throws java.io.IOException
getAvailable
in class StreamImpl
java.io.IOException
public boolean canWrite()
canWrite
in class StreamImpl
public void write(byte[] buf, int offset, int length, boolean isEnd) throws java.io.IOException
write
in class StreamImpl
buf
- byte buffer containing the bytesoffset
- offset where to start writinglength
- number of bytes to writeisEnd
- true when the write is flushing a close.java.io.IOException
public void close() throws java.io.IOException
StreamImpl
close
in class StreamImpl
java.io.IOException