Author: nextgens
Date: 2008-08-15 23:03:04 +0000 (Fri, 15 Aug 2008)
New Revision: 21925
Modified:
trunk/freenet/src/freenet/support/io/LineReadingInputStream.java
Log:
Fix trunk temporarily
Modified: trunk/freenet/src/freenet/support/io/LineReadingInputStream.java
===================================================================
--- trunk/freenet/src/freenet/support/io/LineReadingInputStream.java
2008-08-15 22:19:38 UTC (rev 21924)
+++ trunk/freenet/src/freenet/support/io/LineReadingInputStream.java
2008-08-15 23:03:04 UTC (rev 21925)
@@ -27,14 +27,15 @@
if(maxLength < bufferSize)
bufferSize = maxLength + 1; // Buffer too big, shrink
it (add 1 for the optional \r)
- if(!markSupported())
+ //if(!markSupported())
+ if(true)
return readLineWithoutMarking(maxLength, bufferSize,
utf);
-
+
byte[] buf = new byte[Math.max(Math.min(128, maxLength),
Math.min(1024, bufferSize))];
int ctr = 0;
while(true) {
mark(maxLength);
- int x = read(buf, ctr, buf.length - ctr);
+ int x = read(buf, ctr, buf.length - ctr -1);
if(x == -1) {
if(ctr == 0)
return null;