in src/main/java/org/apache/servicemix/components/util/SimpleFlatFileMarshaler.java [195:220]
private void readNext() {
if (eof) {
next = null;
return;
}
StringBuilder sb = new StringBuilder();
while (true) {
int b;
try {
b = inr.read();
} catch (IOException e) {
throw new RuntimeException(e);
}
if (b == -1) {
eof = true;
break;
}
if ((char) b == lineSeparator.charAt(0)) {
break; //FIXME: handle multi-character line separators
}
sb.append((char) b);
}
next = sb.toString();
}