Class IOFlavor

java.lang.Object
de.grogra.pf.io.IOFlavor

public final class IOFlavor extends Object
An IOFlavor is similar to a DataFlavor: For some data to be transfered in an IO operation, it describes both the type of data and the way how to transfer it. The type is specified by a MimeType, the possible ways for transfer by a combination of those bit masks which are defined in this class.
Author:
Ole Kniemeyer
  • Field Details

    • INPUT_STREAM

      public static final int INPUT_STREAM
      Bit mask indicating that the data can be obtained from an InputStream. The source which provides the data has to implement InputStreamSource.
      See Also:
    • OUTPUT_STREAM

      public static final int OUTPUT_STREAM
      Bit mask indicating that the data can be written to an OutputStream. The source which provides the data has to implement OutputStreamSource.
      See Also:
    • READER

      public static final int READER
      Bit mask indicating that the data can be obtained from a Reader. The source which provides the data has to implement ReaderSource.
      See Also:
    • WRITER

      public static final int WRITER
      Bit mask indicating that the data can be written to a Writer. The source which provides the data has to implement WriterSource.
      See Also:
    • SAX

      public static final int SAX
      Bit mask indicating that the data can be obtained as a series of SAX events. The source which provides the data has to implement SAXSource.
      See Also:
    • FILE_READER

      public static final int FILE_READER
      Bit mask indicating that the data can be obtained from a File. The source which provides the data has to implement FileReaderSource.
      See Also:
    • FILE_WRITER

      public static final int FILE_WRITER
      Bit mask indicating that the data can be written to a File. The source which provides the data has to implement FileWriterSource.
      See Also:
    • DOM

      public static final int DOM
      Bit mask indicating that the data can be obtained as a DOM tree. The source which provides the data has to implement DOMSource.
      See Also:
    • OBJECT

      public static final int OBJECT
      Bit mask indicating that the data can be obtained immediately as an Object. The source which provides the data has to implement ObjectSource.
      See Also:
    • VFILE_READER

      public static final int VFILE_READER
      Bit mask indicating that the data can be obtained from a virtual file. The source which provides the data has to implement VirtualFileReaderSource.
      See Also:
    • VFILE_WRITER

      public static final int VFILE_WRITER
      Bit mask indicating that the data can be written to a virtual file. The source which provides the data has to implement VirtualFileWriterSource.
      See Also:
    • TRANSFER_IO_STREAM

      public static final int TRANSFER_IO_STREAM
      See Also:
    • TRANSFER_STREAM

      public static final int TRANSFER_STREAM
      See Also:
    • TRANSFER_TYPES

      public static final int TRANSFER_TYPES
      See Also:
    • FILE_OUT

      public static final int FILE_OUT
      See Also:
    • INVALID

      public static final IOFlavor INVALID
    • FS_FLAVOR

      public static final IOFlavor FS_FLAVOR
    • XML_FLAVOR

      public static final IOFlavor XML_FLAVOR
    • SCI_FLAVOR

      public static final IOFlavor SCI_FLAVOR
      The IOFlavor type SCI_FLAVOR indicates greenscilab files
    • PROJECT_LOADER

      public static final IOFlavor PROJECT_LOADER
    • RESOURCE_LOADER

      public static final IOFlavor RESOURCE_LOADER
    • REGISTRY_LOADER

      public static final IOFlavor REGISTRY_LOADER
    • GRAPH_LOADER

      public static final IOFlavor GRAPH_LOADER
    • REGISTRY

      public static final IOFlavor REGISTRY
    • NODE

      public static final IOFlavor NODE
  • Constructor Details

    • IOFlavor

      public IOFlavor(MimeType javaMimeType)
    • IOFlavor

      public IOFlavor(MimeType mimeType, int features, Class objectClass)
  • Method Details

    • getMimeType

      public MimeType getMimeType()
    • isInputStreamSupported

      public boolean isInputStreamSupported()
    • isOutputStreamSupported

      public boolean isOutputStreamSupported()
    • isReaderSupported

      public boolean isReaderSupported()
    • isWriterSupported

      public boolean isWriterSupported()
    • isSAXSupported

      public boolean isSAXSupported()
    • isDOMSupported

      public boolean isDOMSupported()
    • isFileReaderSupported

      public boolean isFileReaderSupported()
    • isFileWriterSupported

      public boolean isFileWriterSupported()
    • isObjectSupported

      public boolean isObjectSupported()
    • isVirtualFileReaderSupported

      public boolean isVirtualFileReaderSupported()
    • isVirtualFileWriterSupported

      public boolean isVirtualFileWriterSupported()
    • getObjectClass

      public Class getObjectClass()
    • isAssignableFrom

      public boolean isAssignableFrom(IOFlavor f)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • valueOf

      public static IOFlavor valueOf(String s)
    • valueOf

      public static IOFlavor valueOf(Class cls)
    • valueOf

      public static IOFlavor valueOf(MimeType t)
    • isWritableTo

      public boolean isWritableTo(IOFlavor dest)
    • isWritableTo

      public boolean isWritableTo(MimeType dest)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object