All Packages This Package Class Hierarchy Class Search Index
Inner Class edu.utah.janos.nodeos.pj_ANEPStreamLayer.StreamReader
java.lang.Object
|
+----edu.utah.janos.nodeos.pj_ANEPStreamLayer.StreamReader
protected abstract static class pj_ANEPStreamLayer.StreamReader
extends java.lang.Object
implements java.lang.Runnable
{
// Fields 3
private final InputStream is;
private final pj_BufferHandle pb;
private int users;
// Constructors 1
protected StreamReader(InputStream, pj_BufferHandle);
// Methods 6
protected void acquire();
protected abstract boolean handlePacket(pj_BufferHandle);
private void read(byte[], int, int) throws IOException;
private void readANEPPacketInto(pj_BufferHandle) throws IOException;
protected boolean release();
public void run();
}
StreamReader is an inner class used to read from an InputStream and
produce PacketBuffer's. The stream is expected to contain only
ANEP packets since the length of the packet encoded in the ANEP
header is used to delimit the beginning and end of packets.
- Extended By:
- pj_StdinStreamLayer.StdinStreamReader, pj_TCPStreamLayer.TCPStreamReader
private final InputStream is
private int users
private final pj_BufferHandle pb
protected StreamReader(InputStream is,
pj_BufferHandle pb)
protected void acquire()
protected boolean release()
protected abstract boolean handlePacket(pj_BufferHandle pb)
Handle a packet parsed out of the stream
private void read(byte[] data,
int offset,
int len) throws IOException
Helper function for always reading the specified amount
of data.
private void readANEPPacketInto(pj_BufferHandle bh) throws IOException
public void run()
- Implements:
- run in interface Runnable
All Packages This Package Class Hierarchy Class Search Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7