Closed ruslan-yanchyshyn closed 9 years ago
Now it is possible to use the following code:
IntelHexParser ihp = new IntelHexParser(in); IntelHexParseRangeDetector rangeDetector = new IntelHexParseRangeDetector(); ihp.setDataListener(rangeDetector); ihp.parse(); in.reset(); ByteArrayOutputStream bos = new ByteArrayOutputStream((int)rangeDetector.getLength()); IntelHexParserDemo ihpd = new IntelHexParserDemo(rangeDetector.getStart(), rangeDetector.getStart() + rangeDetector.getLength() - 1, bos); ihp.setDataListener(ihpd); ihp.parse(); byte[] data = bos.toByteArray();
Thank you for that modification. I made some further changes to cleanup the project and use RangeDetector in demo.
Now it is possible to use the following code: