|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrcs.nml.PackedFileReader
public class PackedFileReader
Class that allows the reading of packed files directly without using an NMLConnection.
| Constructor Summary | |
|---|---|
PackedFileReader(NMLMessageDictionary _dict,
boolean _l64_mode)
Create a PackedFileReader for reading log files of a given set of types. |
|
| Method Summary | |
|---|---|
java.lang.String |
convertMsgToString(NMLmsg inMsg)
Use FormatConverter to get a string representation of the message. |
java.util.List<LogTimeEntry> |
createLogTimeEntryList(java.io.File combinedFile,
java.io.File indexFile,
boolean indexIsLittleEndian,
int maxlen,
MsgToTimeStamp mtts)
Create a list to use as an index into a large ".COMBINED" file with multiple messages in it using the ".index" file created by the logRecorder at the same time |
static void |
main(java.lang.String[] args)
|
NMLmsg |
ReadFile(java.io.File f)
Read the entire message in the pointed to file and convert it to an NMLmsg. |
NMLmsg |
ReadFile(java.io.File f,
int max_len)
Read the first max_len bytes from a file and convert it to an NML message. |
NMLmsg |
ReadFile(java.lang.String fileName)
Read the entire file or URL and parse it into an NMLmsg of the appropriate type. |
NMLmsg |
ReadFile(java.lang.String fileName,
int maxlen)
Read the first maxlen bytes out of a file and convert it to an NMLmsg. |
NMLmsg |
ReadFileSection(java.io.File f,
int offset,
int max_len)
Read a message from a large ".COMBINED" file that contains multiple messages. |
NMLmsg |
ReadFileSection(java.lang.String fileName,
int offset,
int maxlen)
Read a section of a large file containing many messages. |
static int[] |
ReadIndexes(java.io.File indexFile,
boolean littleEndian)
Read an indexFile as created by the logRecorder into an integer array. |
static int[] |
ReadIndexes(java.lang.String indexFileName,
boolean littleEndian)
Read an indexFile as created by the logRecorder into an integer array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PackedFileReader(NMLMessageDictionary _dict,
boolean _l64_mode)
_dict - MessageDictionary with auto-generated format functions to parse
this specific file types._l64_mode - should longs be stored or expected to be 64-bit instead of 32-bit| Method Detail |
|---|
public NMLmsg ReadFile(java.lang.String fileName)
fileName - the path to a file, or a filename in the current directory or
a URL beginning with "http://"
public NMLmsg ReadFile(java.lang.String fileName,
int maxlen)
fileName - fileName or path or URL to read.maxlen - number of bytes to actually read.
public NMLmsg ReadFileSection(java.lang.String fileName,
int offset,
int maxlen)
throws java.lang.Exception
fileName - filename or path to file or URL starting with "http://"offset - number of bytes from beginning of file to location of the
desired messagemaxlen - maximum number of bytes in the message
java.lang.Exception - throws exception of offset or max_len exceeds the size of file orpublic NMLmsg ReadFile(java.io.File f)
f - the file to read.
public NMLmsg ReadFile(java.io.File f,
int max_len)
f - file to readmax_len - maximum number of bytes to read.
public static int[] ReadIndexes(java.lang.String indexFileName,
boolean littleEndian)
throws java.lang.Exception
indexFileName - name of the index file.littleEndian - was the log recorder run on a littleEndian platform
(probably true)
java.lang.Exception - occurs if the file does not exist or can not be read.
public static int[] ReadIndexes(java.io.File indexFile,
boolean littleEndian)
throws java.lang.Exception
indexFile - file to readlittleEndian - was the log recorder run on a littleEndian platform
(probably true)
java.lang.Exception - occurs if the file does not exist or can not be read.
public java.util.List<LogTimeEntry> createLogTimeEntryList(java.io.File combinedFile,
java.io.File indexFile,
boolean indexIsLittleEndian,
int maxlen,
MsgToTimeStamp mtts)
throws java.lang.Exception
combinedFile - large file with multiple messages to readindexFile - index file with list of position offsets onlyindexIsLittleEndian - true if the logRecorder was run on a
little-endian platformmaxlen - number of bytes of each message that needs to be read to get
the time stamp.mtts - class to get timestamp out of custom message types.
java.lang.Exception - are thrown if one of files does not exist or is not readable.public static void main(java.lang.String[] args)
public NMLmsg ReadFileSection(java.io.File f,
int offset,
int max_len)
throws java.lang.Exception
f - file to readoffset - offset in bytes to the desired messagemax_len - number of bytes to read from desired message
java.lang.Exception - throws exception of offset or max_len exceeds the size of file or
file is not readable.public java.lang.String convertMsgToString(NMLmsg inMsg)
inMsg -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||