|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.gsfc.drl.rtstps.clients.spooler.Pipe
final class Pipe
SocketReader uses this FIFO queue of Blocks to send data to the SocketWriter.
Field Summary | |
---|---|
private Block[] |
blockArray
|
private boolean |
eos
|
private int |
readIndex
|
private int |
writeIndex
|
Constructor Summary | |
---|---|
Pipe()
Create a pipe of 32 blocks. |
|
Pipe(int blockCount,
int blockSizeBytes)
Create a custom pipe. |
Method Summary | |
---|---|
(package private) byte[] |
getWriteBuffer()
Get a buffer to be used for writing to the pipe. |
(package private) boolean |
isEmpty()
Is the pipe empty? |
(package private) boolean |
isEndOfStream()
Is this the end of stream? |
(package private) boolean |
putWriteBuffer(int length)
Put the write-buffer into the pipe. |
(package private) Block |
read()
Get a filled block from the pipe. |
(package private) void |
release()
Return the last read block to the free block pool. |
(package private) void |
setEndOfStream(boolean eos)
Mark end-of-stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int writeIndex
private int readIndex
private boolean eos
private Block[] blockArray
Constructor Detail |
---|
Pipe()
Pipe(int blockCount, int blockSizeBytes)
blockCount
- The maximum number of blocks in the pipe.blockSizeBytes
- The size of each block in bytes.Method Detail |
---|
final void setEndOfStream(boolean eos)
final boolean isEndOfStream()
final boolean isEmpty()
byte[] getWriteBuffer()
boolean putWriteBuffer(int length)
length
- the true buffer length, which may be less than its
allocated block length.
Block read()
void release()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |