|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jaer.util.HexFileParser
public class HexFileParser
Opens and parses Intel HEX format files for device download.
Nested Class Summary | |
---|---|
class |
HexFileParser.Record
|
Field Summary | |
---|---|
static byte |
DATA_RECORD
|
static byte |
EOF_RECORD
|
static int |
MAX_CODE_LENGTH
you have to specify the required MAX_CODE_LENGTH |
static int |
RADIX
|
java.util.ArrayList<HexFileParser.Record> |
records
|
Constructor Summary | |
---|---|
HexFileParser(java.io.File resourcePath)
Constructs a CustomFileReader object. |
|
HexFileParser(java.lang.String resourcePath)
Constructs a CustomFileReader object. |
Method Summary | |
---|---|
java.util.ArrayList<HexFileParser.Record> |
getRecords()
|
static void |
main(java.lang.String[] args)
|
byte[] |
parseFile()
parses the hexfile and returns an array of bytes that actually contain that would be burnt into the target device. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_CODE_LENGTH
public static final int RADIX
public static final byte DATA_RECORD
public static final byte EOF_RECORD
public java.util.ArrayList<HexFileParser.Record> records
Constructor Detail |
---|
public HexFileParser(java.lang.String resourcePath) throws java.io.FileNotFoundException, java.io.IOException
resourcePath
- intel hex file as resource or file with full pathname.
This filename is a full pathname giving the location of the file somewhere in the classpath (e.g. in the jar of the project) or in the filesystem.
The classpath resources are searched first, followed by the filesystem.
java.io.FileNotFoundException
- If the file can't be found
java.io.IOException
public HexFileParser(java.io.File resourcePath) throws java.io.FileNotFoundException, java.io.IOException
resourcePath
- intel hex file as resource. This filename is a full pathname giving the location of the file somewhere in the classpath (e.g. in the jar of the project).
java.io.FileNotFoundException
- If the file can't be found
java.io.IOException
Method Detail |
---|
public byte[] parseFile() throws java.io.IOException
java.io.IOException
public java.util.ArrayList<HexFileParser.Record> getRecords()
public static void main(java.lang.String[] args)
|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |