private int read(boolean checkEof) throws IOException {
    if (pushBack != -1) {
      int c = pushBack;
      pushBack = -1;
      return c;
    }

    int c = in.read();

    if (checkEof && c == -1) {
      throw new EOFException("Unexpected end of syslog stream");
    }

    return c;
  }
Read the next byte.

@param checkEof true to throw EOFException on EOF, false to return -1.
@return the byte, or -1 on EOF.
ql/src/java/org/apache/hadoop/hive/ql/log/syslog/SyslogParser.java