code: public static TheoraPacket create(OggPacket packet) {
          byte type = packet.getData()[0];
  
          // Special header types detection
          if(isTheoraSpecial(packet)) {
              switch(type) {
              case (byte)TYPE_IDENTIFICATION:
                  return new TheoraInfo(packet);
              case (byte)TYPE_COMMENTS:
                  return new TheoraComments(packet);
              case (byte)TYPE_SETUP:
                  return new TheoraSetup(packet);
              }
          }
  
          return new TheoraVideoData(packet);
      }
docs: Creates the appropriate {@link TheoraPacket}
  instance based on the type.