code: public static OpusPacket create(OggPacket packet) {
         // Special header types detection
         if(isOpusSpecial(packet)) {
             byte type = packet.getData()[4];
             switch(type) {
             case (byte)'H': // OpusHead
                 return new OpusInfo(packet);
             case (byte)'T': // OpusTags
                 return new OpusTags(packet);
             }
         }
  
         return new OpusAudioData(packet);
     }
docs: Creates the appropriate {@link OpusPacket}
  instance based on the type.