private void writeMetadataSameSize(ByteBuffer rawIlstData,long oldIlstSize,long startIstWithinFile,FileChannel fileReadChannel,FileChannel fileWriteChannel,Mp4BoxHeader tagsHeader) throws CannotWriteException, IOException {
  fileReadChannel.position(0);
  fileWriteChannel.transferFrom(fileReadChannel,0,startIstWithinFile);
  fileWriteChannel.position(startIstWithinFile);
  fileWriteChannel.write(rawIlstData);
  fileReadChannel.position(startIstWithinFile + oldIlstSize);
  writeDataAfterIlst(fileReadChannel,fileWriteChannel,tagsHeader);
}

private void writeMetadataSameSize ( ByteBuffer rawIlstData , long oldIlstSize , long startIstWithinFile , FileChannel fileReadChannel , FileChannel fileWriteChannel , Mp4BoxHeader tagsHeader ) throws CannotWriteException , IOException { fileReadChannel . position ( 0 ) ; fileWriteChannel . transferFrom ( fileReadChannel , 0 , startIstWithinFile ) ; fileWriteChannel . position ( startIstWithinFile ) ; fileWriteChannel . write ( rawIlstData ) ; fileReadChannel . position ( startIstWithinFile + oldIlstSize ) ; writeDataAfterIlst ( fileReadChannel , fileWriteChannel , tagsHeader ) ; }
replace the ilst metadata because it is the same size as the original data nothing else has to be modified
