Media Authoring
with Java API

tv.amwa.maj.iface
Interface RandomFile

All Superinterfaces:
AAFFile

public interface RandomFile
extends AAFFile

Specialized file interface for use with files which exist on storage media which has random access capability.

Objects that implement RandomFile also implement the following interfaces:

Author:
Richard Cartwright
See Also:
GetFileBits, SetFileBits

Method Summary
 GetFileBits getFileBits()
          This method obtains file data after a file has been created.
 void revert()
          Reverts this file to the previously saved state.
 void saveAsFile(AAFFile destFile)
          Associates this file with the storage specified the given destination file.
 void setFileBits(SetFileBits setFileBits)
          File data with which the file is to be created.
 
Methods inherited from interface tv.amwa.maj.iface.AAFFile
close, getDictionary, getHeader, getRevision, open, save, saveCopyAs
 

Method Detail

getFileBits

GetFileBits getFileBits()
                        throws BadOpenException,
                               NotWriteableException,
                               BadCloseException

This method obtains file data after a file has been created. The method succeeds if the file has been Opened and then closed, or if it has never previously been opened with write access.

Returns:
File data following the creation of a file.
Throws:
BadOpenException - The file has never been opened.
NotWriteableException - The file has never been opened for writing of modification.
BadCloseException - The file has not been closed having been opened.

revert

void revert()

Reverts this file to the previously saved state.


saveAsFile

void saveAsFile(AAFFile destFile)
                throws NotOpenException,
                       NotWriteableException

Associates this file with the storage specified the given destination file. Any objects stored in the destination file will be lost.

This method behaves in a similar way to AAFFile.saveCopyAs(AAFFile), except that this method will change this object to be associated with the new file.

Special case: if this.saveAs(this) is called then the operation will save everything including things which have not changed.

Parameters:
destFile - File to associated with this one for saving.
Throws:
NotOpenException - The destination file is not open.
NotWriteableException - The destination file cannot be written.

setFileBits

void setFileBits(SetFileBits setFileBits)
                 throws NullPointerException,
                        BadOpenException,
                        NotReadableException

File data with which the file is to be created. This method only succeeds if the file has not yet been opened.

Parameters:
setFileBits - File data with which the file is to be created.
Throws:
NullPointerException - Argument is null.
BadOpenException
NotReadableException

Media Authoring
with Java API

(c) 2007-2008 Richard Cartwright, all rights reserved. Subject to the terms of the AAF SDK Public Source License.