|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tridas.io.AbstractDendroFileReader
org.tridas.io.formats.catras.CatrasReader
public class CatrasReader
| Constructor Summary | |
|---|---|
CatrasReader()
|
|
| Method Summary | |
|---|---|
protected void |
checkFile(byte[] argFileBytes)
Check this is a valid CATRAS file |
int |
getCurrentLineNumber()
Gets the current line number of the reader. |
IMetadataFieldSet |
getDefaults()
Get the default values for this reader that were given in loading the file. |
DendroFileFilter |
getDendroFileFilter()
|
String |
getDescription()
Get the description of the format |
String[] |
getFileExtensions()
Returns a list of the file extensions for this file |
String |
getFullName()
Get the full name of the format |
static int |
getIntFromByte(byte argByte)
Extract a single integer value from a byte |
static int |
getIntFromBytePair(byte[] wBytes,
Boolean littleEndian)
Extract the integer value from a byte pair according to endianess Horror! Java byte is signed! See: http://www.darksleep.com/player/JavaAndUnsignedTypes.html |
org.tridas.schema.TridasProject[] |
getProjects()
Gets the parsed projects after they are loaded. |
String |
getShortName()
Get the short name of the format |
org.tridas.schema.TridasTridas |
getTridasContainer()
|
void |
loadFile(byte[] argFileBytes)
|
void |
loadFile(byte[] argFileBytes,
IMetadataFieldSet argDefaults)
|
void |
loadFile(String[] argFileStrings)
Loads a file just from the strings, using the default metadata |
void |
loadFile(String argFilename,
IMetadataFieldSet argDefaultFields)
Load a file from the given filename or url, and the given defaults. |
void |
loadFile(String argPath,
String argFilename,
IMetadataFieldSet argDefaultFields)
Loads a file from the given path, filename, and defaults. |
protected void |
parseFile(byte[] argFileBytes,
IMetadataFieldSet argDefaultFields)
|
protected void |
parseFile(String[] argFileString,
IMetadataFieldSet argDefaultFields)
Parse the file from the given metadata and strings |
protected void |
resetReader()
Reset the reader |
| Methods inherited from class org.tridas.io.AbstractDendroFileReader |
|---|
addWarning, clearWarnings, constructDefaultMetadata, getDefaultFieldsClass, getOriginalFilename, getWarnings, loadFile, loadFile, loadFile, reset, setOriginalFilename |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CatrasReader()
| Method Detail |
|---|
public void loadFile(String argFilename,
IMetadataFieldSet argDefaultFields)
throws IOException,
IncorrectDefaultFieldsException,
InvalidDendroFileException
AbstractDendroFileReaderAbstractDendroFileReader.loadFile(String, String, IMetadataFieldSet) to load files that aren't
strings.
loadFile in class AbstractDendroFileReaderIncorrectDefaultFieldsException
InvalidDendroFileException
IOException - if the file could not be loadedorg.tridas.io.IDendroCollectionWriter#loadFile(java.lang.String)
public void loadFile(String argPath,
String argFilename,
IMetadataFieldSet argDefaultFields)
throws IOException,
IncorrectDefaultFieldsException,
InvalidDendroFileException
AbstractDendroFileReaderAbstractDendroFileReader.loadFile(String, IMetadataFieldSet) to load files that aren't strings.
loadFile in class AbstractDendroFileReaderIOException
IncorrectDefaultFieldsException
InvalidDendroFileException
public void loadFile(byte[] argFileBytes,
IMetadataFieldSet argDefaults)
throws IncorrectDefaultFieldsException,
InvalidDendroFileException
IncorrectDefaultFieldsException
InvalidDendroFileException
public void loadFile(byte[] argFileBytes)
throws InvalidDendroFileException
InvalidDendroFileException
protected void checkFile(byte[] argFileBytes)
throws InvalidDendroFileException
argFileBytes -
InvalidDendroFileException
protected void parseFile(byte[] argFileBytes,
IMetadataFieldSet argDefaultFields)
throws InvalidDendroFileException
argFileBytes - argDefaultFields -
InvalidDendroFileException
public static int getIntFromBytePair(byte[] wBytes,
Boolean littleEndian)
wBytes - littleEndian - use little-endian?
public static int getIntFromByte(byte argByte)
argBytes - littleEndian - use little-endian?
public String[] getFileExtensions()
AbstractDendroFileReader
getFileExtensions in class AbstractDendroFileReader
protected void parseFile(String[] argFileString,
IMetadataFieldSet argDefaultFields)
AbstractDendroFileReader
parseFile in class AbstractDendroFileReader
public void loadFile(String[] argFileStrings)
throws InvalidDendroFileException
AbstractDendroFileReader
loadFile in class AbstractDendroFileReaderInvalidDendroFileExceptionpublic IMetadataFieldSet getDefaults()
AbstractDendroFileReader
getDefaults in class AbstractDendroFileReaderorg.tridas.io.IDendroFileReader#getDefaults()public int getCurrentLineNumber()
AbstractDendroFileReader
getCurrentLineNumber in class AbstractDendroFileReaderAbstractDendroFileReader.getCurrentLineNumber()public String getDescription()
AbstractDendroFileReader
getDescription in class AbstractDendroFileReaderorg.tridas.io.IDendroFileReader#getDescription()public String getFullName()
AbstractDendroFileReader
getFullName in class AbstractDendroFileReaderorg.tridas.io.IDendroFileReader#getFullName()public String getShortName()
AbstractDendroFileReader
getShortName in class AbstractDendroFileReaderorg.tridas.io.IDendroFileReader#getShortName()protected void resetReader()
AbstractDendroFileReader
resetReader in class AbstractDendroFileReaderAbstractDendroFileReader.resetReader()public DendroFileFilter getDendroFileFilter()
getDendroFileFilter in class AbstractDendroFileReaderAbstractDendroFileReader.getDendroFileFilter()public org.tridas.schema.TridasProject[] getProjects()
AbstractDendroFileReader
getProjects in class AbstractDendroFileReaderAbstractDendroFileReader.getProjects()public org.tridas.schema.TridasTridas getTridasContainer()
getTridasContainer in class AbstractDendroFileReaderAbstractDendroFileReader.getTridasContainer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||