StringBuffer lineBuffer = new StringBuffer();
ByteArrayOutputStream lineStream = new ByteArrayOutputStream();
    public static String readNextLine(ISVNInputFile raFile, int limitBytes) throws SVNException {        StringBuffer lineBuffer = new StringBuffer();        int r = -1;        try {            for(int i = 0; i < limitBytes; i++){                r = raFile.read();                if(r == -1){//unexpected EOF?                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.STREAM_UNEXPECTED_EOF);                    SVNErrorManager.error(err);                }else if(r == '\n'){                    return lineBuffer.toString();                }                lineBuffer.append((char)r);            }        } catch (IOException ioe) {            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Can't read length line in stream: {0}", ioe.getLocalizedMessage());            SVNErrorManager.error(err, ioe);        }        SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Can't read length line in stream");        SVNErrorManager.error(err);        return null;    }