Community
Participate
Working Groups
ErrorParserManager has a method write(byte[], int, int) which takes the given bytes and creates a String with them. Multibyte characters at the buffer boundary can be cut into pieces by this approach (e.g. three byte character whose first 2 bytes are at the end of the current buffer and whose last byte is at the beginning of the next buffer). The right way would be to use a decoder (e.g. CharsetDecoder) which keeps state. Furthermore, it would be nice when an encoding could be specified (for write(byte[], int, int), and outputLine(String, ProblemMarkerInfo) when l.getBytes() is called). An alternative would be to not only accept byte streams but character streams, too. Which means a method write(char[], int, int) and additionally to the outputStream, which is written in outputLine(), a Writer to pass the line as char[] instead of byte[] to avoid the re-encoding.