private ByteBuffer startCreateBasicSecondPage(OggVorbisTagReader.OggVorbisHeaderSizes vorbisHeaderSizes,int newCommentLength,int newSecondPageLength,OggPageHeader secondPageHeader,ByteBuffer newComment) throws IOException {
  logger.fine("WriteOgg Type 1");
  byte[] segmentTable=createSegmentTable(newCommentLength,vorbisHeaderSizes.getSetupHeaderSize(),vorbisHeaderSizes.getExtraPacketList());
  int newSecondPageHeaderLength=OggPageHeader.OGG_PAGE_HEADER_FIXED_LENGTH + segmentTable.length;
  logger.fine("New second page header length:" + newSecondPageHeaderLength);
  logger.fine("No of segments:" + segmentTable.length);
  ByteBuffer secondPageBuffer=ByteBuffer.allocate(newSecondPageLength + newSecondPageHeaderLength);
  secondPageBuffer.order(ByteOrder.LITTLE_ENDIAN);
  secondPageBuffer.put(secondPageHeader.getRawHeaderData(),0,OggPageHeader.OGG_PAGE_HEADER_FIXED_LENGTH - 1);
  secondPageBuffer.put((byte)segmentTable.length);
  for (  byte aSegmentTable : segmentTable) {
    secondPageBuffer.put(aSegmentTable);
  }
  secondPageBuffer.put(newComment);
  return secondPageBuffer;
}

private ByteBuffer startCreateBasicSecondPage ( OggVorbisTagReader . OggVorbisHeaderSizes vorbisHeaderSizes , int newCommentLength , int newSecondPageLength , OggPageHeader secondPageHeader , ByteBuffer newComment ) throws IOException { logger . fine ( "WriteOgg Type 1" ) ; byte [ ] segmentTable = createSegmentTable ( newCommentLength , vorbisHeaderSizes . getSetupHeaderSize ( ) , vorbisHeaderSizes . getExtraPacketList ( ) ) ; int newSecondPageHeaderLength = OggPageHeader . OGG_PAGE_HEADER_FIXED_LENGTH + segmentTable . length ; logger . fine ( "New second page header length:" + newSecondPageHeaderLength ) ; logger . fine ( "No of segments:" + segmentTable . length ) ; ByteBuffer secondPageBuffer = ByteBuffer . allocate ( newSecondPageLength + newSecondPageHeaderLength ) ; secondPageBuffer . order ( ByteOrder . LITTLE_ENDIAN ) ; secondPageBuffer . put ( secondPageHeader . getRawHeaderData ( ) , 0 , OggPageHeader . OGG_PAGE_HEADER_FIXED_LENGTH - 1 ) ; secondPageBuffer . put ( ( byte ) segmentTable . length ) ; for ( byte aSegmentTable : segmentTable ) { secondPageBuffer . put ( aSegmentTable ) ; } secondPageBuffer . put ( newComment ) ; return secondPageBuffer ; }
create a second page , and add comment header to it , but page is incomplete may want to add addition header and need to calculate crc
