org.jnetstream.capture.file.snoop
Interface SnoopInput

All Superinterfaces:
Capture<SnoopPacket>, java.io.Closeable, InputCapture<SnoopPacket>, java.lang.Iterable<SnoopPacket>

public interface SnoopInput
extends InputCapture<SnoopPacket>

A stream formatted to comform to Snoop file format.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jnetstream.capture.InputCapture
InputCapture.FormatTypeOtherFactory
 
Field Summary
 
Fields inherited from interface org.jnetstream.capture.InputCapture
DEFAULT_INPUTCAPTURE_OTHER_FACTORY, PROPERTY_INPUTCAPTURE_OTHER_FACTORY
 
Method Summary
 InputIterator<SnoopPacket> getPacketIterator()
          An interator which iterates over Snoop packets within the stream.
 InputIterator<java.nio.ByteBuffer> getRawIterator()
          An iterator which iterates over Snoop records within the stream and returns them as raw ByteBuffers.
 InputIterator<? extends SnoopRecord> getRecordIterator()
          An iterator which iterates over Snoop records within the stream.
 
Methods inherited from interface org.jnetstream.capture.InputCapture
close, countPackets, getFormatName, getPacketIterator, getRawIterator, getRecordIterator
 
Methods inherited from interface org.jnetstream.capture.Capture
getFilter, getType, isMutable, iterator
 

Method Detail

getPacketIterator

InputIterator<SnoopPacket> getPacketIterator()
                                             throws java.io.IOException
An interator which iterates over Snoop packets within the stream.

Specified by:
getPacketIterator in interface Capture<SnoopPacket>
Specified by:
getPacketIterator in interface InputCapture<SnoopPacket>
Returns:
Iterator capable of throwing IO exceptions
Throws:
java.io.IOException - Any IO errors while retrieving a packet

getRecordIterator

InputIterator<? extends SnoopRecord> getRecordIterator()
                                                       throws java.io.IOException
An iterator which iterates over Snoop records within the stream.

Specified by:
getRecordIterator in interface InputCapture<SnoopPacket>
Returns:
iterator of record
Throws:
java.io.IOException - any IO errors

getRawIterator

InputIterator<java.nio.ByteBuffer> getRawIterator()
                                                  throws java.io.IOException
An iterator which iterates over Snoop records within the stream and returns them as raw ByteBuffers. The limit and position properties within the returned ByteBuffer mark the beginning and end of the record.

Specified by:
getRawIterator in interface InputCapture<SnoopPacket>
Returns:
iterator of raw record contents in ByteBuffers
Throws:
java.io.IOException - any IO errors