loci.formats
Class LegacyQTTools

java.lang.Object
  extended by loci.formats.LegacyQTTools

public class LegacyQTTools
extends Object

Utility class for working with QuickTime for Java.

Source code:
Trac, SVN


Field Summary
static String EXPIRED_QT_MSG
           
protected  boolean expiredQT
          Flag indicating QuickTime for Java has expired.
protected  boolean initialized
          Flag indicating this class has been initialized.
protected static ClassLoader LOADER
          This custom class loader searches additional paths for the QTJava.zip library.
protected static boolean MAC_OS_X
           
static String NO_QT_MSG
           
protected  boolean noQT
          Flag indicating QuickTime for Java is not installed.
protected  ReflectedUniverse r
          Reflection tool for QuickTime for Java calls.
protected static String[] SUFFIXES
           
 
Constructor Summary
LegacyQTTools()
           
 
Method Summary
 boolean canDoQT()
          Whether QuickTime is available to this JVM.
protected static ClassLoader constructLoader()
           
 Dimension getPictDimensions(byte[] bytes)
          Gets width and height for the given PICT bytes.
 ReflectedUniverse getUniverse()
          Gets QuickTime for Java reflected universe.
protected  void initClass()
          Initializes the class.
 boolean isQTExpired()
          Whether QuickTime for Java has expired.
 Image pictToImage(byte[] bytes)
          Converts the given byte array in PICT format to a Java image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_QT_MSG

public static final String NO_QT_MSG
See Also:
Constant Field Values

EXPIRED_QT_MSG

public static final String EXPIRED_QT_MSG
See Also:
Constant Field Values

SUFFIXES

protected static final String[] SUFFIXES

MAC_OS_X

protected static final boolean MAC_OS_X

LOADER

protected static final ClassLoader LOADER
This custom class loader searches additional paths for the QTJava.zip library. Java has a restriction where only one class loader can have a native library loaded within a JVM. So the class loader must be static, shared by all QTForms, or else an UnsatisfiedLinkError is thrown when attempting to initialize QTJava multiple times.


initialized

protected boolean initialized
Flag indicating this class has been initialized.


noQT

protected boolean noQT
Flag indicating QuickTime for Java is not installed.


expiredQT

protected boolean expiredQT
Flag indicating QuickTime for Java has expired.


r

protected ReflectedUniverse r
Reflection tool for QuickTime for Java calls.

Constructor Detail

LegacyQTTools

public LegacyQTTools()
Method Detail

constructLoader

protected static ClassLoader constructLoader()

initClass

protected void initClass()
Initializes the class.


canDoQT

public boolean canDoQT()
Whether QuickTime is available to this JVM.


isQTExpired

public boolean isQTExpired()
Whether QuickTime for Java has expired.


getUniverse

public ReflectedUniverse getUniverse()
Gets QuickTime for Java reflected universe.


getPictDimensions

public Dimension getPictDimensions(byte[] bytes)
                            throws FormatException,
                                   ReflectException
Gets width and height for the given PICT bytes.

Throws:
FormatException
ReflectException

pictToImage

public Image pictToImage(byte[] bytes)
                  throws FormatException
Converts the given byte array in PICT format to a Java image.

Throws:
FormatException