/** * Checks to see if the end of the stream has been reached. * * @return * true if at the end of the stream, false otherwise. * @throws IOException */ public boolean isEndOfFile() throws IOException { return (this.peek() == -1); }
/** * Checks to see if the end of the stream has been reached. * * @return * true if at the end of the stream, false otherwise. * @throws IOException */ public boolean isEndOfFile() throws IOException { return (this.peek() == -1); }
/** * Checks to see if the next character is the delimiter expected. * * @param delimiter * the delimiter to try to peek. * @return * @throws IOException */ private boolean tryPeekDelimiter(char delimiter) throws IOException { if (this.isEndOfFile()) { throw new EOFException(SR.LOG_STREAM_END_ERROR); } else { if ((char) this.peek() != delimiter) { return false; } else { return true; } } }
/** * Checks to see if the next character is the delimiter expected. * * @param delimiter * the delimiter to try to peek. * @return * @throws IOException */ private boolean tryPeekDelimiter(char delimiter) throws IOException { if (this.isEndOfFile()) { throw new EOFException(SR.LOG_STREAM_END_ERROR); } else { if ((char) this.peek() != delimiter) { return false; } else { return true; } } }
char c = (char) this.peek();
char c = (char) this.peek();