code: private ITag readTagHeader() throws UnsupportedDataTypeException {
          // previous tag size (4 bytes) + flv tag header size (11 bytes)
          fillBuffer(15);
          // previous tag's size
          int previousTagSize = in.getInt();
          // start of the flv tag
          byte dataType = in.get();
          if (log.isTraceEnabled()) {
              log.trace("Bits: {}", Integer.toBinaryString(dataType));
          }
          dataType = (byte) (dataType & 31);
          byte filter = (byte) ((dataType & 63) >> 5);
          byte reserved = (byte) ((dataType & 127) >> 6);
          log.debug("Reserved: {}, Filter: {}, Datatype: {}", reserved, filter, dataType);
          switch (dataType) {
              case 8: // audio
                  log.debug("Found audio");
                  break;
              case 9: // video
                  log.debug("Found video");
                  break;
              case 15: // special fms undocumented type?
              case 18: // meta / script data
                  log.debug("Found meta/script data");
                  break;
              default:
                  log.debug("Invalid data type detected ({}), reading ahead\n current position: {} limit: {}", dataType, in.position(), in.limit());
                  throw new UnsupportedDataTypeException("Invalid data type detected (" + dataType + ")");
          }
          int bodySize = IOUtils.readUnsignedMediumInt(in);
          int timestamp = IOUtils.readExtendedMediumInt(in);
          int streamId = IOUtils.readUnsignedMediumInt(in);
          if (log.isDebugEnabled()) {
              log.debug("Data type: {} timestamp: {} stream id: {} body size: {} previous tag size: {}", new Object[] { dataType, timestamp, streamId, bodySize, previousTagSize });
          }
          return new Tag(dataType, timestamp, bodySize, null, previousTagSize);
      }
docs: Read only header part of a tag.
  
  @return Tag header
  @throws UnsupportedDataTypeException