|
|||||||||
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.Block
final class Block
This class contains a block of data. It's the way SocketReader sends data to SocketWriter.
Field Summary | |
---|---|
private static int |
blockSize
|
private byte[] |
data
|
private boolean |
empty
|
private int |
length
|
private boolean |
toggle
|
Constructor Summary | |
---|---|
Block()
Construct a block of the specified block size. |
Method Summary | |
---|---|
(package private) static int |
getBlockSize()
Get the block size in bytes. |
(package private) byte[] |
getData()
Get the data within this block. |
(package private) boolean |
isEmpty()
Is this block empty? |
(package private) boolean |
isToggled()
Is the toggle flag on or off? |
(package private) void |
markUsed(boolean toggle,
int length)
Mark this block as used. |
(package private) static void |
setBlockSize(int size)
Set the block size. |
(package private) void |
setEmpty(boolean e)
Mark this block as empty. |
(package private) boolean |
write(java.io.OutputStream os)
Write this block's data to the output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static int blockSize
private byte[] data
private int length
private boolean empty
private boolean toggle
Constructor Detail |
---|
Block()
Method Detail |
---|
static int getBlockSize()
static void setBlockSize(int size)
final byte[] getData()
final void setEmpty(boolean e)
final boolean isEmpty()
void markUsed(boolean toggle, int length)
toggle
- Set the toggle flag, which has special meaning.
SocketReader uses it to tell SocketWriter to switch to
either the pipe or the file spool to get its next block.length
- The true block length, which may be shorter
than the maximum block length.final boolean isToggled()
boolean write(java.io.OutputStream os)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |