private void readWord(OutputStream out) throws IOException {
    int c;

    while ((c = read(false)) != ' ' && c != -1) {
      out.write(c);
    }

    if (c != -1) {
      unread(c);
    }
  }
Read a word into the given output stream.
Usually the output stream will be a ByteArrayOutputStream.
ql/src/java/org/apache/hadoop/hive/ql/log/syslog/SyslogParser.java