ambit2.core.io
Class FileOutputState

Package class diagram package FileOutputState
java.lang.Object
  extended by com.jgoodies.binding.beans.Model
      extended by ambit2.core.io.FileState
          extended by ambit2.core.io.FileOutputState
All Implemented Interfaces:
ambit2.base.interfaces.IInputOutputState, IOutputState, com.jgoodies.binding.beans.Observable, java.io.Serializable

public class FileOutputState
extends FileState
implements IOutputState

Use getWriter(OutputStream, String) to get a writer of the right type.

See Also:
Serialized Form

Field Summary
static int CML_INDEX
           
static int CSV_INDEX
           
static java.lang.String[] extensionDescription
           
static java.lang.String[] extensions
           
static int HIN_INDEX
           
static int HTML_INDEX
           
static int JPG_INDEX
           
static int MOL_INDEX
           
static int PDB_INDEX
           
static int PDF_INDEX
           
static int PNG_INDEX
           
static int RTF_INDEX
           
static int SDF_INDEX
           
static int SMI_INDEX
           
static int SVG_INDEX
           
static int TXT_INDEX
           
static int XLS_INDEX
           
static int XYZ_INDEX
           
 
Fields inherited from class ambit2.core.io.FileState
currentRecord, extensionDescriptions, file, fileFormat, filename, hashCode, lastModified, length, MSG_CANTCREATEFILE, MSG_ERRORSAVE, MSG_FILEDONOTEXISTS, MSG_OPEN, MSG_UNSUPPORTEDFORMAT, offset, responseType, supportedExtensions
 
Constructor Summary
FileOutputState()
           
FileOutputState(java.io.File file)
           
FileOutputState(java.lang.String filename)
           
 
Method Summary
static java.lang.String getResponseType(java.lang.String ext)
           
 org.openscience.cdk.io.IChemObjectWriter getWriter()
           
static org.openscience.cdk.io.IChemObjectWriter getWriter(java.io.OutputStream stream, java.lang.String ext)
           
 
Methods inherited from class ambit2.core.io.FileState
createFile, equals, getCurrentRecord, getFile, getFilename, getHashCode, getLastModified, getLength, getOffset, getResponseType, getSupportedExtDescriptions, getSupportedExtensions, match, match, setCurrentRecord, setFile, setFilename, setHashCode, setLastModified, setLength, setOffset, setResponseType, setSupportedExtDescriptions, setSupportedExtensions, toString
 
Methods inherited from class com.jgoodies.binding.beans.Model
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ambit2.base.interfaces.IInputOutputState
getCurrentRecord, getResponseType, setCurrentRecord, setResponseType
 

Field Detail

SDF_INDEX

public static final transient int SDF_INDEX
See Also:
Constant Field Values

CSV_INDEX

public static final transient int CSV_INDEX
See Also:
Constant Field Values

SMI_INDEX

public static final transient int SMI_INDEX
See Also:
Constant Field Values

TXT_INDEX

public static final transient int TXT_INDEX
See Also:
Constant Field Values

CML_INDEX

public static final transient int CML_INDEX
See Also:
Constant Field Values

MOL_INDEX

public static final transient int MOL_INDEX
See Also:
Constant Field Values

HIN_INDEX

public static final transient int HIN_INDEX
See Also:
Constant Field Values

PDB_INDEX

public static final transient int PDB_INDEX
See Also:
Constant Field Values

XYZ_INDEX

public static final transient int XYZ_INDEX
See Also:
Constant Field Values

XLS_INDEX

public static final transient int XLS_INDEX
See Also:
Constant Field Values

HTML_INDEX

public static final transient int HTML_INDEX
See Also:
Constant Field Values

PDF_INDEX

public static final transient int PDF_INDEX
See Also:
Constant Field Values

SVG_INDEX

public static final transient int SVG_INDEX
See Also:
Constant Field Values

JPG_INDEX

public static final transient int JPG_INDEX
See Also:
Constant Field Values

PNG_INDEX

public static final transient int PNG_INDEX
See Also:
Constant Field Values

RTF_INDEX

public static final transient int RTF_INDEX
See Also:
Constant Field Values

extensions

public static final transient java.lang.String[] extensions

extensionDescription

public static final transient java.lang.String[] extensionDescription
Constructor Detail

FileOutputState

public FileOutputState()

FileOutputState

public FileOutputState(java.lang.String filename)

FileOutputState

public FileOutputState(java.io.File file)
Method Detail

getWriter

public org.openscience.cdk.io.IChemObjectWriter getWriter()
                                                   throws ambit2.base.exceptions.AmbitIOException
Specified by:
getWriter in interface IOutputState
Throws:
ambit2.base.exceptions.AmbitIOException

getWriter

public static org.openscience.cdk.io.IChemObjectWriter getWriter(java.io.OutputStream stream,
                                                                 java.lang.String ext)
                                                          throws ambit2.base.exceptions.AmbitIOException
Throws:
ambit2.base.exceptions.AmbitIOException

getResponseType

public static java.lang.String getResponseType(java.lang.String ext)