question: private byte [ ] createSegmentTable ( int setupHeaderLength , List < OggPageHeader . PacketStartAndLength > extraPackets ) { ByteArrayOutputStream resultBaos = new ByteArrayOutputStream ( ) ; byte [ ] restShouldBe ; byte [ ] nextPacket ; restShouldBe = createSegments ( setupHeaderLength , true ) ; try { resultBaos . write ( restShouldBe ) ; if ( extraPackets . size ( ) > 0 ) { for ( OggPageHeader . PacketStartAndLength packet : extraPackets ) { nextPacket = createSegments ( packet . getLength ( ) , false ) ; resultBaos . write ( nextPacket ) ; } } } catch ( IOException ioe ) { throw new RuntimeException ( "Unable to create segment table:" + ioe . getMessage ( ) ) ; } return resultBaos . toByteArray ( ) ; }
target:  This method creates a new segment table for the second half of setup header