|
SourceForge Jpcap | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
net.sourceforge.jpcap.capture.PacketInputStream
public abstract class PacketInputStream
PacketInputStream provides an easy way of reading packets from the network or a savefile
without having to define and register PacketListeners.
PacketCapture.getInputStream()| Constructor Summary | |
|---|---|
protected |
PacketInputStream()
Creates a new instance of PacketInputStream |
| Method Summary | |
|---|---|
abstract void |
close()
Closing the stream stops all the associated capture activities. |
int |
read()
|
int |
read(byte[] buffer)
|
int |
read(byte[] buffer,
int offset,
int length)
|
abstract Packet |
readPacket()
Read a Packet from the network or savefile, depending on how the stream was constructed. |
| Methods inherited from class java.io.InputStream |
|---|
available, mark, markSupported, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected PacketInputStream()
| Method Detail |
|---|
public abstract void close()
throws IOException
close in interface Closeableclose in class InputStreamIOException
public int read()
throws IOException
This implementation throws UnsupportedOperationException.
read in class InputStreamIOException
public int read(byte[] buffer)
throws IOException
This implementation throws UnsupportedOperationException.
read in class InputStreamIOException
public int read(byte[] buffer,
int offset,
int length)
throws IOException
This implementation throws UnsupportedOperationException.
read in class InputStreamIOException
public abstract Packet readPacket()
throws SocketTimeoutException,
EOFException,
IOException
SocketTimeoutException - The timeout specified when the capture device was opened has expired without a packet being captured.
EOFException - End of a savefile has been reached.
IOException - I/O problem reading packet.
|
Copyright © Patrick Charles & Jonas Lehmann, 2001; Esmond Pitt, 2008. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||