Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
saving state of AtomContainer?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

saving state of AtomContainer?



How do I save the state of an AtomContainer?

I tried:
//get settings from the AtomContainer
byte[] mybyteArray = new byte[ myAtomContainer.getSize() ];
myAtomContainer.copyToArray( 0, mybyteArray, 0, mybyteArray.length );

//try to put the settings back in
myAtomContainer.copyFromArray( 0, mybyteArray, 0, mybyteArray.length );

unfortunately, this doesn't work. I get arrayOutOfBounds exception.
I am not even sure if this is the correct way to save the state of an
AtomContainer.
Any one know how to do this?

& a solution to an earlier problem:
I was trying to re-apply save settings from a MovieContainer object and
having no luck -- but I solved my problem.
I had to make sure in the createMovieFile to pass in
"createMovieFileDontCreateResFile". I do not know why I have to do this --
but I figured it out.

working example:
QTFile outputQTFile = new QTFile( outputPath );
outputQTFile.createMovieFile( kMoviePlayer,
(createMovieFileDontCreateResFile | createMovieFileDeleteCurFile ) );




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.