@Test public void testParseFile() throws Exception { ByteArrayInputStream reader = new ByteArrayInputStream((":040000000201BB320C\n" + ":01000B0032C2").getBytes("ascii")); List<IntelHexPacket> packets = IntelHex.openIntelHexFile(reader); IntelHexPacket packet0 = packets.get(0); IntelHexPacket packet1 = packets.get(1); assertEquals(1, packet0.lineNo); assertEquals(RecordType.DATA, packet0.recordType); assertEquals(0, packet0.address); assertArrayEquals(new byte[]{0x02, 0x01, (byte) 0xbb, 0x32}, packet0.data); assertEquals(2, packet1.lineNo); assertEquals(RecordType.DATA, packet1.recordType); assertEquals(0x0b, packet1.address); assertArrayEquals(new byte[]{0x32}, packet1.data); }
public static List<IntelHexPacket> openIntelHexFile(final File file) throws IOException { return openIntelHexFile(new FileInputStream(file)); }
IntelHex { public static List<IntelHexPacket> openIntelHexFile(final File file) throws IOException { return openIntelHexFile(new FileInputStream(file)); } }
IntelHex { public static List<IntelHexPacket> openIntelHexFile(final File file) throws IOException { return openIntelHexFile(new FileInputStream(file)); }  }
IntelHex { public static List<IntelHexPacket> openIntelHexFile(final File file) throws IOException { return openIntelHexFile(new FileInputStream(file)); }  static List<IntelHexPacket> openIntelHexFile(final File file); static List<IntelHexPacket> openIntelHexFile(final InputStream is); static String createLine(RecordType recordType, int address, byte[] data); static IntelHexPacket parseLine(int lineNo, String line); }
IntelHex { public static List<IntelHexPacket> openIntelHexFile(final File file) throws IOException { return openIntelHexFile(new FileInputStream(file)); }  static List<IntelHexPacket> openIntelHexFile(final File file); static List<IntelHexPacket> openIntelHexFile(final InputStream is); static String createLine(RecordType recordType, int address, byte[] data); static IntelHexPacket parseLine(int lineNo, String line);  }