|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public static interface Captures.Factory
A factory interface for interfacing with implementation of jNetStream API. Factory interfaces are made up of 3 parts. A common part and 1 remote and 1 local part. The common part is this interface, while LocalFactory provides additional methods which are only available on a local system and are not available as part of the RemoteFactory interface. RemoteFactory interface provides additional methods which may be used remotely, while it will not contain methods that should only be called locally.
| Field Summary |
|---|
| Fields inherited from interface org.jnetstream.capture.Captures.LiveCaptureFactory |
|---|
LIVE_CAPTURE_FACTORY_CLASS_PROPERTY |
| Method Summary | ||
|---|---|---|
long |
append(FileCapture<? extends FilePacket> dst,
Capture... srcs)
Copies all of the CapturePackets returned by the source into the already open capture file. |
|
long |
catFile(FormatType type,
java.io.File dst,
Capture... srcs)
Concatenate all the files into the |
|
long |
catFile(FormatType type,
java.io.File dst,
java.io.File... srcs)
Concatenate all the files into the |
|
long |
countPackets(java.io.File dst)
|
|
FormatType |
formatType(java.io.File file)
Determines the format type of the supplied file. |
|
FormatType |
formatType(java.nio.channels.ReadableByteChannel in)
Determines the format type of the supplied "input". |
|
|
newFile(java.lang.Class<T> c,
java.io.File file)
Creates a new empty file of the user specified type. |
|
|
newFile(java.lang.Class<T> t,
java.io.File f,
Capture<? extends CapturePacket> capture)
Creates a new file and dumps all of the packet from capture to the new file in the proper format. |
|
FileCapture<? extends FilePacket> |
newFile(FormatType type,
java.io.File file)
|
|
|
newFile(FormatType type,
java.io.File file,
Capture<? extends CapturePacket> capture)
Creates a new file and dumps all of the packet from capture to the new file in the proper format. |
|
|
openFile(java.lang.Class<T> t,
java.io.File file)
|
|
|
openFile(java.lang.Class<T> type,
java.io.File file,
FileMode mode,
Filter<ProtocolFilterTarget> filter)
|
|
FileCapture<? extends FilePacket> |
openFile(java.io.File file)
|
|
FileCapture<? extends FilePacket> |
openFile(java.io.File file,
FileMode mode,
Filter<ProtocolFilterTarget> protocolFilter)
Gets a mutable FileCapture instance for the specified file. |
|
void |
registerListener(CaptureListener listener)
|
|
void |
removeRegisteredListener(CaptureListener listener)
|
|
java.util.List<java.io.File> |
splitFile(java.io.File file)
Splits the file into smaller files according to default rules defined for each file format. |
|
java.util.List<java.io.File> |
splitFile(java.io.File file,
long packetCount,
boolean maxCompression)
Split the specified file into smaller files containing specified number of packets each from the source file. |
|
boolean |
validateFile(java.io.File file)
Checks if the specified file is in a proper format 100% compabile with specification. |
|
| Methods inherited from interface org.jnetstream.capture.Captures.LiveCaptureFactory |
|---|
listCaptureDevices, newCaptureDevice, openLive, openLive, openLive, openLive, openLive, openLive, openLive, openTransmitter, openTransmitter |
| Method Detail |
|---|
long append(FileCapture<? extends FilePacket> dst,
Capture... srcs)
throws java.io.IOException
dst - capture file to write the packets intosrcs - capture source to read packets from
java.io.IOException - any IO errors
long catFile(FormatType type,
java.io.File dst,
Capture... srcs)
throws java.io.IOException
type - TODOdst - file to store all the concatenated datasrcs - array of source files to concatenate together
java.io.IOException
long catFile(FormatType type,
java.io.File dst,
java.io.File... srcs)
throws java.io.FileNotFoundException,
java.io.IOException
type - TODOdst - file to store all the concatenated datasrcs - array of source files to concatenate together
java.io.IOException
java.io.FileNotFoundException
long countPackets(java.io.File dst)
throws java.io.IOException,
FileFormatException
dst -
java.io.IOException
FileFormatException
FormatType formatType(java.io.File file)
throws java.io.IOException
file - file to check and return format type
java.io.IOException
FormatType formatType(java.nio.channels.ReadableByteChannel in)
throws java.io.IOException
in - input to check and return format type
java.io.IOException
<T extends FileCapture<? extends FilePacket>> T newFile(java.lang.Class<T> c,
java.io.File file)
throws java.io.IOException,
FileFormatException
file - file to createtype - type of file to create
java.io.IOException - any IO errors
FileFormatException
<T extends FileCapture<? extends FilePacket>> T newFile(java.lang.Class<T> t,
java.io.File f,
Capture<? extends CapturePacket> capture)
throws java.io.IOException
f - file to createcapture - source of CapturePackets which will be dumped into the new filetype - the type of file to create
java.io.IOException - any IO errors
FileCapture<? extends FilePacket> newFile(FormatType type,
java.io.File file)
throws java.io.IOException
type - file -
java.io.IOException
<T extends FileCapture<? extends FilePacket>> T newFile(FormatType type,
java.io.File file,
Capture<? extends CapturePacket> capture)
throws java.io.IOException
type - the type of file to createfile - file to createcapture - source of CapturePackets which will be dumped into the new file
java.io.IOException - any IO errors
<T extends FileCapture<? extends FilePacket>> T openFile(java.lang.Class<T> t,
java.io.File file)
throws java.io.IOException,
FileFormatException
java.io.IOException
FileFormatException
<T extends FileCapture<? extends FilePacket>> T openFile(java.lang.Class<T> type,
java.io.File file,
FileMode mode,
Filter<ProtocolFilterTarget> filter)
throws java.io.IOException,
FileFormatException
java.io.IOException
FileFormatException
FileCapture<? extends FilePacket> openFile(java.io.File file)
throws java.io.IOException
java.io.IOException
FileCapture<? extends FilePacket> openFile(java.io.File file,
FileMode mode,
Filter<ProtocolFilterTarget> protocolFilter)
throws java.io.IOException
file - filename to open for reading and writtingmode - TODO
java.io.IOException - any IO or format errorsvoid registerListener(CaptureListener listener)
void removeRegisteredListener(CaptureListener listener)
java.util.List<java.io.File> splitFile(java.io.File file)
throws java.io.IOException
Splits the file into smaller files according to default rules defined for each file format. For NAP the file will be split with each Block Record being split into its own seperate file. For other files, the defaults are to split the files into byte files.
The base filename supplied is used as the base filename for all newly created files with the -XXXX appended to them.
The source file is unmodified
file - file to be split
java.io.IOException
java.util.List<java.io.File> splitFile(java.io.File file,
long packetCount,
boolean maxCompression)
throws java.io.IOException
Split the specified file into smaller files containing specified number of packets each from the source file. New files are created to hold only the specified number of packets and associated meta records. The supplied filename is used as a base filename for all newly created files with the post fix of -XXXX appended to them.
The source file is unmodified
file - source file to splitpacketCount - split using this many packets from the source file copied into
the newly created filesmaxCompression - true means produce the smallest possible file, while false means
leave it upto the default algorithm for each spcific file type.
For example NAP files pad their files to 512Kb by default which
means that files containing even only a single packet are of
minimum size 512 Kb, but this can be overriden by setting
maxCompression to true. Notice that it will be harder to split
the NAP file with regular unix commands if default padding is
not used.
java.io.IOException
boolean validateFile(java.io.File file)
throws java.io.IOException
file - file to validate
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||