Merge remote branch 'origin/bufferedReaderFix' into oss-master

This commit is contained in:
Joel Dice 2011-09-01 09:37:10 -06:00
commit 8c9bfccb9e

View File

@ -42,7 +42,15 @@ public class BufferedReader extends Reader {
} }
for (int i = position; i < limit; ++i) { for (int i = position; i < limit; ++i) {
if (buffer[i] == '\n') { if(buffer[i] == '\r') {
sb.append(buffer, position, i - position);
position = i + 1;
if(i+1 < limit && buffer[i+1] == '\n') {
position = i + 1;
return sb.toString();
}
return sb.toString();
} else if (buffer[i] == '\n') {
sb.append(buffer, position, i - position); sb.append(buffer, position, i - position);
position = i + 1; position = i + 1;
return sb.toString(); return sb.toString();