|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface InputCapture<T extends CapturePacket>
Formatted InputStream based capture session. This object itself is not an InputStream and can not be call chained with other InputStream objects. The inputstream has to be formatted and conform to one of the supported file format standards. The stream only allows read-only iterators to accessed which will decoded the formatted stream and produce either FilePacket, Record or raw ByteBuffers read from the stream.
| Nested Class Summary | |
|---|---|
static interface |
InputCapture.FormatTypeOtherFactory
Factory interface used by InputCapture factories to load NPL based files who's format is FormatType.Other. |
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_INPUTCAPTURE_OTHER_FACTORY
|
static java.lang.String |
PROPERTY_INPUTCAPTURE_OTHER_FACTORY
Name of the system property used used in loading FormatType.Other file formats. |
| Method Summary | |
|---|---|
void |
close()
Closes the capture session and the underlying inputstream. |
long |
countPackets()
Counts the number of packets in the input. |
java.lang.String |
getFormatName()
Gets the name of this format. |
InputIterator<T> |
getPacketIterator()
Gets an iterator that will iterate and return CapturePacket objects. |
InputIterator<T> |
getPacketIterator(Filter<ProtocolFilterTarget> filter)
Gets an iterator that will iterate and return CapturePacket objects. |
InputIterator<java.nio.ByteBuffer> |
getRawIterator()
Gets an iterator that will iterate and return raw ByteBuffer based record read from the inputstream. |
InputIterator<java.nio.ByteBuffer> |
getRawIterator(Filter<RecordFilterTarget> filter)
Gets an iterator that will iterate and return raw ByteBuffer based record read from the inputstream. |
InputIterator<? extends Record> |
getRecordIterator()
Gets an iterator that will iterate and return Record objects, just like a normal file based capture would produce except these records are read-only. |
InputIterator<? extends Record> |
getRecordIterator(Filter<RecordFilterTarget> filter)
Gets an iterator that will iterate and return Record objects, just like a normal file based capture would produce except these records are read-only. |
| Methods inherited from interface org.jnetstream.capture.Capture |
|---|
getFilter, getType, isMutable, iterator |
| Field Detail |
|---|
static final java.lang.String PROPERTY_INPUTCAPTURE_OTHER_FACTORY
FormatType.Other file formats. You can use the system
property PROPERTY_INPUTCAPTURE_OTHER_FACTORY to override its
default value which is "org.jnetstream.capture.inputcapture.other".
static final java.lang.String DEFAULT_INPUTCAPTURE_OTHER_FACTORY
| Method Detail |
|---|
long countPackets()
throws java.io.IOException
java.io.IOException - any IO errors
InputIterator<T> getPacketIterator()
throws java.io.IOException
getPacketIterator in interface Capture<T extends CapturePacket>java.io.IOException - any IO errors
InputIterator<T> getPacketIterator(Filter<ProtocolFilterTarget> filter)
throws java.io.IOException
filter - a packet filter to apply to the interator
java.io.IOException - any IO errors
InputIterator<? extends Record> getRecordIterator()
throws java.io.IOException
java.io.IOException - any IO errors
InputIterator<? extends Record> getRecordIterator(Filter<RecordFilterTarget> filter)
throws java.io.IOException
filter - filter to apply to the iterator
java.io.IOException - any IO errors
InputIterator<java.nio.ByteBuffer> getRawIterator()
throws java.io.IOException
java.io.IOException - any IO errors
InputIterator<java.nio.ByteBuffer> getRawIterator(Filter<RecordFilterTarget> filter)
throws java.io.IOException
filter - filter to apply to the iterator
java.io.IOException - any IO errors
void close()
throws java.io.IOException
close in interface java.io.Closeablejava.io.IOExceptionjava.lang.String getFormatName()
FormatType.Other as it will give a more
detailed name of the file format.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||