|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.InputStream
verinec.netsim.util.net.sockets.SocketInputStream
public class SocketInputStream
A SocketInputStream that gets it's data from a SocketImpl.
| Field Summary | |
|---|---|
private SlidingWindowByteBuffer |
buffer
|
private SocketImpl |
impl
|
private Logger |
jlogger
|
| Constructor Summary | |
|---|---|
SocketInputStream(SocketImpl impl)
Constructs a new SocketInputStream that gets it's data from a SocketImpl |
|
| Method Summary | |
|---|---|
void |
addPacket(TCPPacket packet)
adds a Packet to this streams buffer |
void |
close()
|
int |
getAck()
gets the address of the last part of the buffer that can be acknowledged |
int |
getWindowSize()
gets the window size of the buffer |
int |
read()
reads one byte of data from this buffer |
| Methods inherited from class java.io.InputStream |
|---|
available, mark, markSupported, read, read, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private SocketImpl impl
private SlidingWindowByteBuffer buffer
private Logger jlogger
| Constructor Detail |
|---|
public SocketInputStream(SocketImpl impl)
throws IOException
impl - a SocketImpl
IOException - if an I/O error occurs| Method Detail |
|---|
public int read()
throws IOException
read in class InputStreamIOException - if teh connection is closedInputStream.read()public int getWindowSize()
public int getAck()
public void addPacket(TCPPacket packet)
throws NetSimException
packet - a Packet to be added to the buffer
NetSimException - if the Packet can't be added to the buffer, e.g. the buffer is full
public void close()
throws IOException
close in interface Closeableclose in class InputStreamIOExceptionInputStream.close()
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||