com.voytechs.jnetstream.io
Class RandomAccessCaptureFile

java.lang.Object
  extended by com.voytechs.jnetstream.io.RandomAccessCaptureFile

public class RandomAccessCaptureFile
extends java.lang.Object

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Constructor Summary
RandomAccessCaptureFile(java.io.File file)
           
 
Method Summary
 void close()
           
 java.io.RandomAccessFile getFile()
           
 long getMaxRecordLength()
           
 long getRecordLength()
           
 void open()
           
 long searchForPattern(double percent, long maxSearch)
           
 long searchForRecordStart(long offset, long maxSearch)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomAccessCaptureFile

public RandomAccessCaptureFile(java.io.File file)
                        throws java.io.FileNotFoundException,
                               java.io.UnsupportedEncodingException
Throws:
StreamFormatException
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
Method Detail

open

public void open()
          throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

searchForPattern

public long searchForPattern(double percent,
                             long maxSearch)
                      throws java.io.EOFException,
                             java.io.IOException
Throws:
java.io.EOFException
java.io.IOException

searchForRecordStart

public long searchForRecordStart(long offset,
                                 long maxSearch)
                          throws java.io.EOFException,
                                 java.io.IOException
Throws:
java.io.EOFException
java.io.IOException

getRecordLength

public final long getRecordLength()
Returns:

getMaxRecordLength

public long getMaxRecordLength()
Returns:

getFile

public java.io.RandomAccessFile getFile()
Returns: