public class FileState extends Object implements IInputOutputState
Modifier and Type | Class and Description |
---|---|
static class |
FileState._FILE_TYPE |
Modifier and Type | Field and Description |
---|---|
protected long |
currentRecord |
protected String[] |
extensionDescriptions |
protected File |
file |
protected org.openscience.cdk.io.formats.IChemFormat |
fileFormat |
protected String |
filename |
protected int |
hashCode |
protected long |
lastModified |
protected long |
length |
protected static String |
MSG_CANTCREATEFILE |
protected static String |
MSG_ERRORSAVE |
protected static String |
MSG_FILEDONOTEXISTS |
protected static String |
MSG_OPEN |
protected static String |
MSG_UNSUPPORTEDFORMAT |
protected long |
offset |
protected String |
responseType |
protected String[] |
supportedExtensions |
Constructor and Description |
---|
FileState() |
FileState(File file) |
FileState(String filename) |
Modifier and Type | Method and Description |
---|---|
File |
createFile() |
boolean |
equals(Object obj) |
long |
getCurrentRecord() |
protected static String[] |
getExtensionDescriptions(boolean input) |
protected static String[] |
getExtensions(boolean input) |
File |
getFile() |
org.openscience.cdk.io.formats.IChemFormat |
getFileFormat() |
String |
getFilename() |
int |
getHashCode() |
long |
getLastModified() |
long |
getLength() |
long |
getOffset() |
String |
getResponseType() |
String[] |
getSupportedExtDescriptions() |
String[] |
getSupportedExtensions() |
boolean |
match() |
boolean |
match(File file) |
void |
setCurrentRecord(long currentRecord) |
void |
setFile(File file) |
void |
setFile(File file,
org.openscience.cdk.io.formats.IChemFormat format) |
void |
setFilename(String filename) |
void |
setHashCode(int hashCode) |
void |
setLastModified(long lastModified) |
void |
setLength(long length) |
void |
setOffset(long offset) |
void |
setResponseType(String responseType) |
void |
setSupportedExtDescriptions(String[] descr) |
void |
setSupportedExtensions(String[] ext) |
String |
toString() |
protected static transient String MSG_FILEDONOTEXISTS
protected static transient String MSG_CANTCREATEFILE
protected static transient String MSG_OPEN
protected static transient String MSG_UNSUPPORTEDFORMAT
protected static transient String MSG_ERRORSAVE
protected String responseType
protected String[] supportedExtensions
protected String[] extensionDescriptions
protected String filename
protected long length
protected long lastModified
protected int hashCode
protected transient File file
protected long offset
protected long currentRecord
protected org.openscience.cdk.io.formats.IChemFormat fileFormat
public FileState()
public FileState(String filename)
public FileState(File file)
public org.openscience.cdk.io.formats.IChemFormat getFileFormat()
public String getFilename()
public void setFilename(String filename)
filename
- The filename to set.public int getHashCode()
public void setHashCode(int hashCode)
hashCode
- The hashCode to set.public long getLastModified()
public void setLastModified(long lastModified)
lastModified
- The lastModified to set.public long getLength()
public void setLength(long length)
length
- The length to set.public File getFile()
public void setFile(File file)
public void setFile(File file, org.openscience.cdk.io.formats.IChemFormat format)
file
- The file to set.public long getCurrentRecord()
getCurrentRecord
in interface IInputOutputState
public void setCurrentRecord(long currentRecord)
setCurrentRecord
in interface IInputOutputState
currentRecord
- The currentRecord to set.public long getOffset()
public void setOffset(long offset)
offset
- The offset to set.public boolean match() throws AmbitIOException
AmbitIOException
public boolean match(File file)
public File createFile() throws AmbitIOException
AmbitIOException
public String getResponseType()
getResponseType
in interface IInputOutputState
public void setResponseType(String responseType)
setResponseType
in interface IInputOutputState
public String[] getSupportedExtensions()
public String[] getSupportedExtDescriptions()
public void setSupportedExtensions(String[] ext)
public void setSupportedExtDescriptions(String[] descr)
protected static String[] getExtensionDescriptions(boolean input)
protected static String[] getExtensions(boolean input)
Copyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.