public class IntelHexFile extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IntelHexFile.CodeSegment |
class |
IntelHexFile.IntelHexLine |
Modifier and Type | Field and Description |
---|---|
protected static byte[] |
EOF_DATA |
protected static String |
H |
protected static Pattern |
IHEX_MINIMAL_LINE_PATTERN |
eu.javaexperience.collection.ReadOnlyAndRwCollection<List<IntelHexFile.IntelHexLine>> |
lines |
Constructor and Description |
---|
IntelHexFile() |
IntelHexFile(String[] lines) |
Modifier and Type | Method and Description |
---|---|
void |
assertValid() |
static byte |
checksum(byte[] data,
int from,
int to) |
static List<IntelHexFile.CodeSegment> |
concatSegments(List<IntelHexFile.CodeSegment> codes,
int maxGap,
byte paddingByte) |
IntelHexFile.IntelHexLine |
createDataLine(int address,
byte[] data) |
IntelHexFile.IntelHexLine |
createEofLine() |
static IntelHexFile |
fromSegments(List<IntelHexFile.CodeSegment> codes) |
List<IntelHexFile.CodeSegment> |
getCode() |
int |
getDataSize() |
static IntelHexFile |
loadFile(eu.javaexperience.file.AbstractFile file) |
static IntelHexFile |
loadFile(String file) |
static String |
toHex(byte data) |
void |
writeToFile(eu.javaexperience.file.AbstractFile file) |
void |
writeToFile(String file) |
protected static final String H
protected static final Pattern IHEX_MINIMAL_LINE_PATTERN
protected static final byte[] EOF_DATA
public eu.javaexperience.collection.ReadOnlyAndRwCollection<List<IntelHexFile.IntelHexLine>> lines
public IntelHexFile()
public IntelHexFile(String[] lines)
public static byte checksum(byte[] data, int from, int to)
public IntelHexFile.IntelHexLine createEofLine()
public IntelHexFile.IntelHexLine createDataLine(int address, byte[] data)
public void assertValid()
public static String toHex(byte data)
public static IntelHexFile loadFile(String file) throws IOException
IOException
public static IntelHexFile loadFile(eu.javaexperience.file.AbstractFile file) throws IOException
IOException
public int getDataSize()
public List<IntelHexFile.CodeSegment> getCode() throws IOException
IOException
public static List<IntelHexFile.CodeSegment> concatSegments(List<IntelHexFile.CodeSegment> codes, int maxGap, byte paddingByte) throws IOException
IOException
public static IntelHexFile fromSegments(List<IntelHexFile.CodeSegment> codes)
public void writeToFile(String file) throws IOException
IOException
public void writeToFile(eu.javaexperience.file.AbstractFile file) throws IOException
IOException
Copyright © 2020. All rights reserved.