Package jmri.jmrix.pricom.downloader
Class PdiFile
java.lang.Object
jmri.jmrix.pricom.downloader.PdiFile
Support for reading PRICOM ".pdi" files
The PRICOM format documentation is Copyright 2003, 2005, PRICOM Corp. They have kindly given permission for this use.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the comment embedded at the front of the file.byte[]getNext(int n) Get the next n bytes for transmission to the device(package private) intlength()voidopen()voidopen(InputStream stream)
-
Field Details
-
file
-
comment
-
commentLength
int commentLength -
lastAddress
int lastAddress -
address
int address -
fileLength
int fileLength
-
-
Constructor Details
-
PdiFile
-
-
Method Details
-
open
- Throws:
IOException
-
open
- Throws:
IOException
-
getComment
Return the comment embedded at the front of the file.- Returns:
- file comment.
-
length
int length() -
getNext
Get the next n bytes for transmission to the device- Parameters:
n- number of data bytes to include- Returns:
- byte buffer, starting with address info and containing data, but not CRC
-