code: public static boolean isUDP(final Buffer t) {
          try {
              return t.capacity() == 3 && t.getByte(0) == 'U' && t.getByte(1) == 'D' && t.getByte(2) == 'P';
          } catch (final IOException e) {
              return false;
          }
      }
docs: Check whether the buffer is exactly three bytes long and has the bytes "UDP" in it.
  
  @param t
  @return