/** * Reads a single character from this reader and returns it with the two * higher-order bytes set to 0. If possible, BufferedReader returns a * character from the buffer. If there are no characters available in the * buffer, it fills the buffer and then returns a character. It returns -1 * if there are no more characters in the source reader. * * @return the character read or -1 if the end of the source reader has been * reached. * @throws IOException * if this reader is closed or some other I/O error occurs. */ @Override public int read() throws IOException { synchronized (lock) { checkNotClosed(); int ch = readChar(); if (lastWasCR && ch == '\n') { ch = readChar(); } lastWasCR = false; return ch; } }
/** * Reads a single character from this reader and returns it with the two * higher-order bytes set to 0. If possible, BufferedReader returns a * character from the buffer. If there are no characters available in the * buffer, it fills the buffer and then returns a character. It returns -1 * if there are no more characters in the source reader. * * @return the character read or -1 if the end of the source reader has been * reached. * @throws IOException * if this reader is closed or some other I/O error occurs. */ @Override public int read() throws IOException { synchronized (lock) { checkNotClosed(); int ch = readChar(); if (lastWasCR && ch == '\n') { ch = readChar(); } lastWasCR = false; return ch; } }
/** * Reads a single character from this reader and returns it with the two * higher-order bytes set to 0. If possible, BufferedReader returns a * character from the buffer. If there are no characters available in the * buffer, it fills the buffer and then returns a character. It returns -1 * if there are no more characters in the source reader. * * @return the character read or -1 if the end of the source reader has been * reached. * @throws IOException * if this reader is closed or some other I/O error occurs. */ @Override public int read() throws IOException { synchronized (lock) { checkNotClosed(); int ch = readChar(); if (lastWasCR && ch == '\n') { ch = readChar(); } lastWasCR = false; return ch; } }
/** * Reads a single character from this reader and returns it with the two * higher-order bytes set to 0. If possible, BufferedReader returns a * character from the buffer. If there are no characters available in the * buffer, it fills the buffer and then returns a character. It returns -1 * if there are no more characters in the source reader. * * @return the character read or -1 if the end of the source reader has been * reached. * @throws IOException * if this reader is closed or some other I/O error occurs. */ @Override public int read() throws IOException { synchronized (lock) { checkNotClosed(); int ch = readChar(); if (lastWasCR && ch == '\n') { ch = readChar(); } lastWasCR = false; return ch; } }
/** * Reads a single character from this reader and returns it with the two * higher-order bytes set to 0. If possible, BufferedReader returns a * character from the buffer. If there are no characters available in the * buffer, it fills the buffer and then returns a character. It returns -1 * if there are no more characters in the source reader. * * @return the character read or -1 if the end of the source reader has been * reached. * @throws IOException * if this reader is closed or some other I/O error occurs. */ @Override public int read() throws IOException { synchronized (lock) { checkNotClosed(); int ch = readChar(); if (lastWasCR && ch == '\n') { ch = readChar(); } lastWasCR = false; return ch; } }
/** * Reads a single character from this reader and returns it with the two * higher-order bytes set to 0. If possible, BufferedReader returns a * character from the buffer. If there are no characters available in the * buffer, it fills the buffer and then returns a character. It returns -1 * if there are no more characters in the source reader. * * @return the character read or -1 if the end of the source reader has been * reached. * @throws IOException * if this reader is closed or some other I/O error occurs. */ @Override public int read() throws IOException { synchronized (lock) { checkNotClosed(); int ch = readChar(); if (lastWasCR && ch == '\n') { ch = readChar(); } lastWasCR = false; return ch; } }
/** * Reads a single character from this reader and returns it with the two * higher-order bytes set to 0. If possible, BufferedReader returns a * character from the buffer. If there are no characters available in the * buffer, it fills the buffer and then returns a character. It returns -1 * if there are no more characters in the source reader. * * @return the character read or -1 if the end of the source reader has been * reached. * @throws IOException * if this reader is closed or some other I/O error occurs. */ @Override public int read() throws IOException { synchronized (lock) { checkNotClosed(); int ch = readChar(); if (lastWasCR && ch == '\n') { ch = readChar(); } lastWasCR = false; return ch; } }
/** * Reads a single character from this reader and returns it with the two * higher-order bytes set to 0. If possible, BufferedReader returns a * character from the buffer. If there are no characters available in the * buffer, it fills the buffer and then returns a character. It returns -1 * if there are no more characters in the source reader. * * @return the character read or -1 if the end of the source reader has been * reached. * @throws IOException * if this reader is closed or some other I/O error occurs. */ @Override public int read() throws IOException { synchronized (lock) { checkNotClosed(); int ch = readChar(); if (lastWasCR && ch == '\n') { ch = readChar(); } lastWasCR = false; return ch; } }