Documentation of 'visad.data.jai.JAIForm' Java class
JAIForm
visad.data.jai

Class JAIForm

  • All Implemented Interfaces:
    FormFileInformer


    public class JAIForm
    extends Form
    implements FormFileInformer
    JAIForm is the VisAD data form for image formats supported by the Java Advanced Imaging API: BMP, GIF, FlashPix, JPEG, PNG, PNM, and TIFF.
    • Constructor Summary

      Constructors 
      Constructor and Description
      JAIForm()
      Constructs a new JAI file form.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(java.lang.String id, Data data, boolean replace)
      Adds data to an existing JAI image file.
      java.lang.String[] getDefaultSuffixes()
      Returns the default file suffixes for the JAI image file formats.
      FormNode getForms(Data data)
      Return the data forms that are compatible with a data object.
      boolean isThisType(byte[] block)
      Checks if the given block is a valid header for a JAI image file.
      boolean isThisType(java.lang.String name)
      Checks if the given string is a valid filename for a JAI image file.
      static void main(java.lang.String[] args)
      Run 'java visad.data.visad.JAIForm in_file' to test read an image file supported by Java Advanced Imaging.
      DataImpl open(java.lang.String id)
      Opens an existing JAI image file from the given location.
      DataImpl open(java.net.URL url)
      Opens an existing JAI image file from the given URL.
      void save(java.lang.String id, Data data, boolean replace)
      Saves a VisAD Data object to a JAI image format at the given location.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JAIForm

        public JAIForm()
        Constructs a new JAI file form.
    • Method Detail

      • isThisType

        public boolean isThisType(java.lang.String name)
        Checks if the given string is a valid filename for a JAI image file.
        Specified by:
        isThisType in interface FormFileInformer
        Parameters:
        name - name of the file
        Returns:
        true if the name is right for this type of form
      • isThisType

        public boolean isThisType(byte[] block)
        Checks if the given block is a valid header for a JAI image file.
        Specified by:
        isThisType in interface FormFileInformer
        Parameters:
        block - block of bytes from file
        Returns:
        true if the magic number is right
      • getDefaultSuffixes

        public java.lang.String[] getDefaultSuffixes()
        Returns the default file suffixes for the JAI image file formats.
        Specified by:
        getDefaultSuffixes in interface FormFileInformer
        Returns:
        array of suffixes
      • save

        public void save(java.lang.String id,
                         Data data,
                         boolean replace)
                  throws BadFormException,
                         java.io.IOException,
                         java.rmi.RemoteException,
                         VisADException
        Saves a VisAD Data object to a JAI image format at the given location.
        Specified by:
        save in class FormNode
        Throws:
        BadFormException - Always thrown (method is not implemented).
        java.io.IOException
        java.rmi.RemoteException
        VisADException
      • add

        public void add(java.lang.String id,
                        Data data,
                        boolean replace)
                 throws BadFormException
        Adds data to an existing JAI image file.
        Specified by:
        add in class FormNode
        Throws:
        BadFormException - Always thrown (method is not implemented).
      • getForms

        public FormNode getForms(Data data)
        Description copied from class: FormNode
        Return the data forms that are compatible with a data object.
        Specified by:
        getForms in class FormNode
      • main

        public static void main(java.lang.String[] args)
                         throws VisADException,
                                java.rmi.RemoteException,
                                java.io.IOException
        Run 'java visad.data.visad.JAIForm in_file' to test read an image file supported by Java Advanced Imaging.
        Throws:
        VisADException
        java.rmi.RemoteException
        java.io.IOException

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.