public void addPacket ( FLVTag pkt ) throws IOException { if ( ! writePacket ( writeBuf , pkt ) ) { writeBuf . flip ( ) ; startOfLastPacket -= out . write ( writeBuf ) ; writeBuf . clear ( ) ; if ( ! writePacket ( writeBuf , pkt ) ) throw new RuntimeException ( "Unexpected" ) ; } }
Add a packet to the underlying file