question: private void copyToBuffer ( Buffer bDest ) { if ( reassembledDataFullSize <= MAX_H264_FRAME_SIZE ) { byte [ ] finalData = new byte [ reassembledDataFullSize + 1 ] ; int finalDataPos = 0 ; finalData [ finalDataPos ] = reassembledDataNALHeader ; finalDataPos += 1 ; int posCurrent = reassembledDataPosSeqStart ; int posSeq = 0 ; while ( ( posCurrent & VIDEO_DECODER_MAX_PAYLOADS_CHUNKS_MASK ) != reassembledDataPosSeqEnd ) { posSeq = posCurrent & VIDEO_DECODER_MAX_PAYLOADS_CHUNKS_MASK ; System . arraycopy ( reassembledData [ posSeq ] , 0 , finalData , finalDataPos , reassembledDataSize [ posSeq ] ) ; finalDataPos += reassembledDataSize [ posSeq ] ; posCurrent ++ ; } System . arraycopy ( reassembledData [ reassembledDataPosSeqEnd ] , 0 , finalData , finalDataPos , reassembledDataSize [ reassembledDataPosSeqEnd ] ) ; bDest . setData ( finalData ) ; bDest . setLength ( reassembledDataSize [ reassembledDataPosSeqEnd ] ) ; bDest . setOffset ( 0 ) ; bDest . setTimeStamp ( timeStamp ) ; bDest . setFormat ( format ) ; bDest . setFlags ( Buffer . FLAG_RTP_MARKER | Buffer . FLAG_RTP_TIME ) ; bDest . setVideoOrientation ( videoOrientation ) ; bDest . setSequenceNumber ( seqNumber ) ; } reassembledData = null ; }
target:  Assumes that complete() has been called and returns true.