|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--quicktime.app.QTFactory
The QTFactory class provides factory methods for creating classes that are used to present media that QuickTime can import. It also provides some utility methods for finding directories and files in the local file system.
An example usage of some of the factory methods:
File mediaFile = QTFactory.findAbsolutePath ("media/myMovie.mov"); QTDrawable d = QTFactory.makeDrawable(new QTFile(mediaFile)); myQTCanvas.setClient (d); ... // from an URL QTDrawable d2 = QTFactory.makeDrawable ("http://web.mywebsite.com/movies/myMovie.mov"); myOtherQTCanvas.setClient (d2);
Method Summary | |
static void |
addDirectory(java.io.File dir)
This method will add a directory to the internal list of directories that are searched in the find methods. |
static java.io.File |
findAbsolutePath(java.lang.String fileName)
Given a filename this method will exhaustively search all paths found in the user.dir and the classPath and will return a file object that contains an absolute path to the specified argument. |
static java.io.File |
findInSystemPaths(java.lang.String fileName)
This method will take apart the path specification of the fileName and return the first instance of the file (the last name in the path) that it finds within the directories that are known to Java at runtime. |
static QTDrawable |
makeDrawable(java.io.InputStream is,
int hintType,
java.lang.String hintString)
This returns a QTDrawable object from the specified input stream. |
static QTDrawable |
makeDrawable(java.io.InputStream is,
int hintType,
java.lang.String hintString,
QTDrawableMaker maker)
This returns a QTDrawable object from the specified input stream. |
static QTDrawable |
makeDrawable(QTFile qtFile)
This returns a QTDrawable object from the specified file. |
static QTDrawable |
makeDrawable(QTFile qtFile,
QTDrawableMaker maker)
This returns a QTDrawable object from the specified file. |
static QTDrawable |
makeDrawable(java.lang.String url)
This returns a QTDrawable object from the specified URL. |
static QTDrawable |
makeDrawable(java.lang.String url,
QTDrawableMaker maker)
This returns a QTDrawable object from the specified Universal Resource Locator. |
static void |
removeDirectory(java.io.File dir)
This method will remove a directory from the internal list of directories that are searched in the find methods. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.io.File findInSystemPaths(java.lang.String fileName) throws java.io.IOException
path
- a path specification that should be found somewhere in the system pathsjava.lang.SecurityException
- will be returned if the Applet is not allowed access to the class path
system property. Typically this is the case - you should use the codeBase or documentBase paths of the
applet to position and locate files at run time.java.io.IOException
- the file cannot be found in any of the class path locations.public static void addDirectory(java.io.File dir) throws java.io.IOException
dir
- a directorypublic static void removeDirectory(java.io.File dir) throws java.io.IOException
dir
- a directorypublic static java.io.File findAbsolutePath(java.lang.String fileName) throws java.io.IOException
fileName
- the file to search for.java.lang.SecurityException
- will be returned if the Applet is not allowed access to the class path
system property. Typically this is the case - you should use the codeBase or documentBase paths of the
applet to position and locate files at run time.java.io.IOException
- the file cannot be found in any of the class path locations.public static QTDrawable makeDrawable(QTFile qtFile) throws java.io.IOException, QTException
file
- the file to make a movie out ofStdQTException
- If the file is of a format that is not understood by QuickTime
the function will throw a StdQTException with error code invalidMovie.java.io.IOException
- is thrown if the file would violate security settings of an appletGraphicsImporterDrawer
,
QTPlayer
,
QTDrawableMaker
public static QTDrawable makeDrawable(QTFile qtFile, QTDrawableMaker maker) throws java.io.IOException, QTException
file
- the file to make a movie out ofmaker
- specifies which type of QTDrawable object is returned when the factory imports a
Graphics or Movie based media.StdQTException
- If the file is of a format that is not understood by QuickTime
the function will throw a StdQTException with error code invalidMovie.java.io.IOException
- if the file is not foundGraphicsImporterDrawer
,
QTPlayer
,
QTDrawableMaker
public static QTDrawable makeDrawable(java.io.InputStream is, int hintType, java.lang.String hintString) throws java.io.IOException, QTException
is
- the input stream from which the bytes will be readhintFlag
- describes the hint data that is usedhintString
- contains the hint informationStdQTException
- If the data is of a format that is not understood by QuickTime
the function will throw a StdQTException with error code invalidMovie.java.io.IOException
- is thrown if the input stream is unable to aquire all the dataGraphicsImporterDrawer
,
QTPlayer
,
QTDrawableMaker
public static QTDrawable makeDrawable(java.io.InputStream is, int hintType, java.lang.String hintString, QTDrawableMaker maker) throws java.io.IOException, QTException
hintFlag
- describes the hint data that is usedhintString
- contains the hint informationmaker
- specifies which type of QTDrawable object is returned when the factory imports a
Graphics or Movie based media.StdQTException
- If the data is of a format that is not understood by QuickTime
the function will throw a StdQTException with error code invalidMovie.java.io.IOException
- is thrown if the input stream is unable to aquire all the dataGraphicsImporterDrawer
,
QTPlayer
,
QTDrawableMaker
public static QTDrawable makeDrawable(java.lang.String url) throws QTException
url
- specifies the URL to the QT source mediaStdQTException
- If the file is of a format that is not understood by QuickTime
the function will throw a StdQTException with error code invalidMovie.java.lang.SecurityException
- is thrown if the file would violate security settings of an appletpublic static QTDrawable makeDrawable(java.lang.String url, QTDrawableMaker maker) throws QTException
url
- is the fully qualified url to the QuickTime media.maker
- specifies which type of QTDrawable object is returned when the factory imports a
Graphics or Movie based media.StdQTException
- If the file is of a format that is not understood by QuickTime
the function will throw a StdQTException with error code invalidMovie.java.lang.SecurityException
- is thrown if the file would violate security settings of an appletGraphicsImporterDrawer
,
QTPlayer
,
QTDrawableMaker
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |