Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## quicktime.io
Class QTFile

    java.lang.Object
      |
      +--java.io.File
            |
            +--quicktime.io.QTFile

All Implemented Interfaces:
  java.lang.Comparable, quicktime.jdirect.InterfaceLib, quicktime.jdirect.PrimitivesLib, quicktime.jdirect.QuickTimeLib, java.io.Serializable, com.apple.jdirect.SharedLibrary, quicktime.jdirect.SharedLibrary

public final class QTFile
extends java.io.File
implements quicktime.jdirect.QuickTimeLib

The QTFile class represents a file for QuickTime movies.

See Also:
  Serialized Form

Field Summary
`static int` | `kDeletePermission` Permission flags used to test security accessibility of a file path
`static int` | `kReadPermission` Permission flags used to test security accessibility of a file path
`static int[]` | `kStandardQTFileTypes` Standard types used in get file.
`static int` | `kWritePermission` Permission flags used to test security accessibility of a file path

Fields inherited from class java.io.File
`pathSeparator, pathSeparatorChar, separator, separatorChar`

Fields inherited from interface quicktime.jdirect.QuickTimeLib
`JDirect_MacOSX, libraryInstance, name`

Constructor Summary
`QTFile(java.io.File file)` Used to return a QTFile object from a Java file object.
`QTFile(java.lang.String pathName)` Used to return a QTFile object from a full path specification

Method Summary
`static void` | `checkSecurity(java.lang.String fileName, int permission)` This method will assume that the incoming path is a full path specification for a file and will check the security manager settings to see if the current security settings allow this file to be read from or written to.
`void` | `convertToMovieFile(QTFile outputFile, int fCreator, int inFlags)` This method takes a specified file and converts it to a movie file.
`void` | `convertToMovieFile(QTFile outputFile, int fCreator, int inFlags, MovieImporter mic)` This method takes a specified file and converts it to a movie file.
`void` | `convertToMovieFile(QTFile outputFile, int fCreator, int flags, MovieImporter mic, MovieProgress mp)` This method takes a specified file and converts it to a movie file.
`void` | `createMovieFile(int fCreator, int flags)` Creates a file as specified by this QTFile.
`void` | `createShortcutMovieFile(int creator, int scriptTag, int createMovieFileFlags, DataRef targetDataRef)` Creates a short cut movie file as specified by this QTFile.
`boolean` | `delete()` This method deletes a movie file.
`static QTFile` | `fromGraphicsExporterInput(GraphicsExporter g)` Determines the file that is the source of input images to the Graphics exporter.
`static QTFile` | `fromGraphicsExporterOutput(GraphicsExporter g)` Determines the file that is the destination of Output images to the Graphics exporter.
`static QTFile` | `fromGraphicsImporter(GraphicsImporter g)` Determines the file that the graphics resides in.
`static GraphicsImporterInfo` | `fromGraphicsImporter(GraphicsImporter g, QTFile inDefaultSpec, java.lang.String prompt)` Presents a dialog box letting the user save an image in a foreign file format.
`static QTFile` | `fromSequenceGrabber(SequenceGrabber s)` Allows you to determine the movie file that is currently assigned to a sequence grabber component.
`static QTFile` | `fromSynthesizerConnections(SynthesizerConnections conns)` Return a QTFile (or null if none) of a sound bank file that is used by a MusicComponent as specified in that component's SynthesizerConnections
`byte[]` | `getFSSpec(boolean fileExists, int permissions)` Returns the byte array containing the fsspec.
`AliasHandle` | `newAlias(boolean minimal)` Creates an alias record that describes the specified target.
`static QTFile` | `resolveAlias(AliasHandle alias)` This method will take an alias and will resolve it, returning the full path name of the resolved file.
`QTFile` | `resolveAlias(boolean resolveAliasChains)` Returns the target FSSpec passed in QuickTime::ResolveAliasFile
`static QTFile` | `standardGetFilePreview(int[] fileTypes)` Present a standard open file panel to the user to retrieve a file.

Methods inherited from class java.io.File
`canRead, canWrite, compareTo, compareTo, createNewFile, createTempFile, createTempFile, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURL`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### kStandardQTFileTypes

    public static final int[] kStandardQTFileTypes

  Standard types used in get file.

### kReadPermission

    public static final int kReadPermission

  Permission flags used to test security accessibility of a file path

### kWritePermission

    public static final int kWritePermission

  Permission flags used to test security accessibility of a file path

### kDeletePermission

    public static final int kDeletePermission

  Permission flags used to test security accessibility of a file path

Constructor Detail

### QTFile

    public QTFile(java.lang.String pathName)

  Used to return a QTFile object from a full path specification
  Parameters:
    `pathName` - the full path name of the file

### QTFile

    public QTFile(java.io.File file)

  Used to return a QTFile object from a Java file object.
  Parameters:
    `file` - a java File object

Method Detail

### fromGraphicsImporter

    public static QTFile fromGraphicsImporter(GraphicsImporter g)
                                       throws QTException

  Determines the file that the graphics resides in.
  QuickTime::GraphicsImportGetDataFile

  Returns:
    The file that contains the graphics data.
  See Also:
    `GraphicsImporter.getDataFile()`

### fromGraphicsImporter

    public static GraphicsImporterInfo fromGraphicsImporter(GraphicsImporter g,
                                                            QTFile inDefaultSpec,
                                                            java.lang.String prompt)
                                                     throws QTException

  Presents a dialog box letting the user save an image in a foreign file format.
  QuickTime::GraphicsImportDoExportImageFileDialog

  Parameters:
    `inDefaultSpec` - suggests the default name for the file. If you do not want to suggest a default name, pass null.
    `prompt` - A prompt that appears in the standard put dialog box; it may be nil, in which case a default string is used.
  See Also:
    `GraphicsImporter.doExportImageFileDialog(quicktime.io.QTFile, java.lang.String)`

### fromGraphicsExporterInput

    public static QTFile fromGraphicsExporterInput(GraphicsExporter g)
                                            throws QTException

  Determines the file that is the source of input images to the Graphics exporter.
  QuickTime::GraphicsExportGetInputFile

  Returns:
    The QTFile object
  See Also:
    `GraphicsExporter.getInputFile()`

### fromGraphicsExporterOutput

    public static QTFile fromGraphicsExporterOutput(GraphicsExporter g)
                                             throws QTException

  Determines the file that is the destination of Output images to the Graphics exporter.
  QuickTime::GraphicsExportGetOutputFile

  Returns:
    The QTFile object
  See Also:
    `GraphicsExporter.getOutputFile()`

### fromSequenceGrabber

    public static QTFile fromSequenceGrabber(SequenceGrabber s)
                                      throws QTException

  Allows you to determine the movie file that is currently assigned to a sequence grabber component.
  QuickTime::SGGetDataOutput

  Returns:
    The QTFile movie file.
  See Also:
    `SequenceGrabber.getDataOutputFile()`

### fromSynthesizerConnections

    public static QTFile fromSynthesizerConnections(SynthesizerConnections conns)
                                             throws QTException

  Return a QTFile (or null if none) of a sound bank file that is used by a MusicComponent as specified in that component's SynthesizerConnections
  Parameters:
    `conns` - the Synthesiser connections
  Returns:
    a QTFile

### checkSecurity

    public static void checkSecurity(java.lang.String fileName,
                                     int permission)

  This method will assume that the incoming path is a full path specification for a file and will check the security manager settings to see if the current security settings allow this file to be read from or written to. If the requested security access is dissallowed a SecurityException is thrown.
  Parameters:
    `fileName` - a full path file specification path
    `permission` - the requested permission.

### resolveAlias

    public static QTFile resolveAlias(AliasHandle alias)
                               throws QTException

  This method will take an alias and will resolve it, returning the full path name of the resolved file. You must have read permission to the resultant file path or a SecurityException will be thrown.
  QuickTime::ResolveAlias
  Parameters:
    `alias` - the alias to resolve
  Returns:
    the QTFile object of the resolved alias

### standardGetFilePreview

    public static QTFile standardGetFilePreview(int[] fileTypes)
                                         throws QTException

  Present a standard open file panel to the user to retrieve a file.
  QuickTime::StandardGetFilePreview()

  Parameters:
    `fileTypes` - the particular file types you want the user to see. No fileTypes assumes all files. Max of 4.
  Returns:
    The file object.

### getFSSpec

    public final byte[] getFSSpec(boolean fileExists,
                                  int permissions)
                           throws QTIOException

  Returns the byte array containing the fsspec.
  Parameters:
    `flag` - if true then the file must exist or a fnfError is thrown otherwise it is not required that the file exist
    `permissions` - you must specify whether the file will be reading or writing.
  Returns:
    the byte array

### convertToMovieFile

    public void convertToMovieFile(QTFile outputFile,
                                   int fCreator,
                                   int inFlags)
                            throws QTException

  This method takes a specified file and converts it to a movie file.
  QuickTime::ConvertFileToMovieFile()

  Parameters:
    `outputFie` - the destination movie file.
    `fCreator` - Specifies the creator value for the file if it is a new one.
    `inFlags` - Controls movie file conversion flags.

### convertToMovieFile

    public void convertToMovieFile(QTFile outputFile,
                                   int fCreator,
                                   int inFlags,
                                   MovieImporter mic)
                            throws QTException

  This method takes a specified file and converts it to a movie file. The specified files must be full paths or a fnfErr exception will be thrown
  QuickTime::ConvertFileToMovieFile()

  Parameters:
    `outputFile` - the destination movie file.
    `fCreator` - Specifies the creator value for the file if it is a new one.
    `inFlags` - Controls movie file conversion flags.
    `mec` - Specifies the movie export component if used for translation, null otherwise.

### convertToMovieFile

    public void convertToMovieFile(QTFile outputFile,
                                   int fCreator,
                                   int flags,
                                   MovieImporter mic,
                                   MovieProgress mp)
                            throws QTException

  This method takes a specified file and converts it to a movie file. The specified files must be full paths or a fnfErr exception will be thrown
  QuickTime::ConvertFileToMovieFile()

  Parameters:
    `outputFile` - the destination movie file.
    `fCreator` - Specifies the creator value for the file if it is a new one.
    `flags` - Controls movie file conversion flags.
    `mec` - Specifies the movie export component if used for translation, null otherwise.
    `mp` - Specifies the movie progress object or null otherwise.

### createMovieFile

    public void createMovieFile(int fCreator,
                                int flags)
                         throws QTIOException

  Creates a file as specified by this QTFile. This call will not open the created movie file.
  QuickTime::CreateMovieFile()

  Parameters:
    `pathName` - specifies the complete pathName of the file that is to be created.
    `fCreator` - Specifies the creator of the file.
    `flags` - Specifies the behaviour when creating the file.

### createShortcutMovieFile

    public void createShortcutMovieFile(int creator,
                                        int scriptTag,
                                        int createMovieFileFlags,
                                        DataRef targetDataRef)
                                 throws QTException

  Creates a short cut movie file as specified by this QTFile. A Shortcut movie just contains a data reference which refers to another movie.
  QuickTime::CreateShortcutMovieFile()

  Parameters:
    `pathName` - specifies the complete pathName of the file that is to be created.
    `creator` - Specifies the creator of the file.
    `scriptTag` - the system script identifier
    `createMovieFileFlags` - Specifies the behaviour when creating the file.
    `targetDataRef` - this is a data reference to the location of the data that is referred to by the resultant movie that this call creates.

### newAlias

    public AliasHandle newAlias(boolean minimal)
                         throws QTException

  Creates an alias record that describes the specified target.
  QuickTime::QTNewAlias

  Parameters:
    `minimal` - if true then the alias is a minimal alias.
  Returns:
    an AliasHandle that represents the QTFile

### resolveAlias

    public QTFile resolveAlias(boolean resolveAliasChains)
                        throws QTIOException

  Returns the target FSSpec passed in
  QuickTime::ResolveAliasFile
  Parameters:
    `resolveAliasChains` - set to true if all aliases to be resolved in a chain.

### delete

    public boolean delete()

  This method deletes a movie file.
  QuickTime::DeleteMovieFile()
Overrides:
  `delete` in class `java.io.File`

  Returns:
    `true` if the file is successfully deleted; `false` otherwise.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD