//Creates the ByteBuffer for the ogg tag
ByteBuffer ogg = creator.convert(tag);
int tagLength = ogg.capacity() + VorbisHeader.FIELD_PACKET_TYPE_LENGTH + VorbisHeader.FIELD_CAPTURE_PATTERN_LENGTH + OggVorbisCommentTagCreator.FIELD_FRAMING_BIT_LENGTH;
ByteBuffer buf = ByteBuffer.allocate(tagLength);
//[packet type=comment0x03]['vorbis']
buf.put((byte) VorbisPacketType.COMMENT_HEADER.getType());
buf.put(VorbisHeader.CAPTURE_PATTERN_AS_BYTES);
//The actual tag
buf.put(ogg);
//Framing bit = 1
buf.put(FRAMING_BIT_VALID_VALUE);
buf.rewind();
return buf;