class EolBufferedReader {

    public String readLineKeepStartEol() throws IOException {
        StringBuilder stringBuilder = new StringBuilder();

        synchronized (monitor) {
            int read = reader.read();
            if (read == -1) {
                return null;
            }
            stringBuilder.append((char) read);
            if (read == '\r') {
                read = reader.read();
                if (read == -1) {
                    return stringBuilder.toString();
                }
                stringBuilder.append((char) read);
            }
            while(true) {
                reader.mark(1);
                read = reader.read();
                if (read == -1) {
                    break;
                }
                if (read == '\n' || read == '\r') {
                    reader.reset();
                    break;
                }
                stringBuilder.append((char) read);
            }
        }

        return stringBuilder.toString();
    }

    public  EolBufferedReader(BufferedReader bufferedReader);

}