private void expect(int c) throws IOException {
    int d = read(true);

    if (d != c) {
      throw new IOException("Unexpected syslog character: " + (char) d);
    }
  }
Read a byte and assert the value.

@throw IOException if the character was unexpected
ql/src/java/org/apache/hadoop/hive/ql/log/syslog/SyslogParser.java