private byte[] readTag() throws IOException {
    ByteArrayOutputStream ret = new ByteArrayOutputStream(16);
    int c;

    while ((c = read(true)) != ':' && c != '[' && c != '\r' && c != '\n') {
      ret.write(c);
    }

    unread(c);

    return ret.toByteArray();
  }
Read a RFC 3164 tag.
Tags end with left bracket, colon, ASCII CR, or ASCII NL.
ql/src/java/org/apache/hadoop/hive/ql/log/syslog/SyslogParser.java