|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--NWNFiles.NWNFile | +--NWNFiles.GFFFile
14 juil. 2003
Nested Class Summary | |
class |
GFFFile.Field
|
class |
GFFFile.Structure
|
Nested classes inherited from class NWNFiles.NWNFile |
NWNFile.FileState |
Field Summary | |
static String |
DefaultVersion
Default GFF file version. |
static long |
FieldBlockSize
Sise, in bytes, of a field block in a gff file. |
static long |
HeaderSize
Size, in bytes, of a gff file header. |
static String[] |
KnownGFFExtensions
List of the known gff file extensions. |
static long |
LabelBlockSize
Size, in bytes, of a label block in the gff file. |
static long |
StructBlockSize
Size, in bytes, of a sctructure block in the gff file. |
Fields inherited from class NWNFiles.NWNFile |
currentLanguage, fileState |
Constructor Summary | |
GFFFile()
Constructs GFFFile object, this file has the default root structure of type 0xFFFFFFFF |
|
GFFFile(File file)
Constructs a GFFFile object. |
|
GFFFile(File file,
Observer observer)
Constructs a GFFFile object. |
|
GFFFile(Observer observer)
Constructs a GFFFile object, this file has the default root structure of type 0xFFFFFFFF An observer can be assigned to the file to monitor its modifications. |
Method Summary | |
protected void |
addField(GFFFile.Field newField)
|
protected String |
addLabel(String label)
|
void |
addStructure(GFFFile.Structure newStruct)
|
GFFFile.Structure |
addStructure(long type,
GFFFile.Field[] fields)
|
long |
getFieldCount()
|
long |
getFieldDataCount()
|
long |
getFieldIndiciesCount()
|
File |
getFilePath()
|
String |
getFileType()
|
String |
getFileVersion()
|
long |
getLabelCount()
|
long |
getListIndiciesCount()
|
GFFFile.Structure |
getStruct(int index)
|
long |
getStructCount()
|
boolean |
isModified()
|
void |
load(File file)
|
void |
removeStruct(GFFFile.Structure structure)
Removes a structure from the GFF file. |
void |
save()
|
void |
save(File newFilePath)
|
protected void |
setFieldCount(long _fieldCount)
|
void |
setFileType(String fileType)
|
protected void |
setIsModified(boolean modified)
|
Methods inherited from class NWNFiles.NWNFile |
getCurrentLanguage, getFileState, setCurrentLanguage |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String DefaultVersion
public static final long FieldBlockSize
public static final long HeaderSize
public static final String[] KnownGFFExtensions
public static final long LabelBlockSize
public static final long StructBlockSize
Constructor Detail |
public GFFFile()
public GFFFile(File file) throws FileDoesNotExist, InvalidFile, NameTooLong, FileNotFoundException, IOException, InvalidType
file
- The file to parse.
FileDoesNotExist
- If the file cannot be found.
InvalidFile
- If the file is not a valid gff file.
NameTooLong
- If the file is not a valid gff file.
FileNotFoundException
- If the file cannot be found.
IOException
- If the file is not a valid gff file.
InvalidType
- If the file is not a valid gff file.public GFFFile(File file, Observer observer) throws FileDoesNotExist, InvalidFile, NameTooLong, FileNotFoundException, IOException, InvalidType
FileState
object when it's modified.
file
- The file to parse.observer
- An observer.
FileDoesNotExist
- If the file cannot be found.
InvalidFile
- If the file is not a valid gff file.
NameTooLong
- If the file is not a valid gff file.
FileNotFoundException
- If the file cannot be found.
IOException
- If the file is not a valid gff file.
InvalidType
- If the file is not a valid gff file.public GFFFile(Observer observer)
FileState
object when it's modified.
observer
- An observer.
FileDoesNotExist
- If the file cannot be found.
InvalidFile
- If the file is not a valid gff file.
NameTooLong
- If the file is not a valid gff file.
FileNotFoundException
- If the file cannot be found.
IOException
- If the file is not a valid gff file.
InvalidType
- If the file is not a valid gff file.Method Detail |
protected void addField(GFFFile.Field newField)
protected String addLabel(String label)
public GFFFile.Structure addStructure(long type, GFFFile.Field[] fields)
public void addStructure(GFFFile.Structure newStruct)
public long getFieldCount()
public long getFieldDataCount()
public long getFieldIndiciesCount()
public File getFilePath()
public String getFileType()
public String getFileVersion()
public long getLabelCount()
public long getListIndiciesCount()
public GFFFile.Structure getStruct(int index)
public long getStructCount()
public boolean isModified()
public void load(File file) throws FileDoesNotExist, InvalidFile, NameTooLong, FileNotFoundException, IOException, InvalidType
FileDoesNotExist
InvalidFile
NameTooLong
FileNotFoundException
IOException
InvalidType
public void save() throws IOException, InvalidType
IOException
InvalidType
public void save(File newFilePath) throws IOException, InvalidType
IOException
InvalidType
protected final void setFieldCount(long _fieldCount)
public void setFileType(String fileType)
protected void setIsModified(boolean modified)
public void removeStruct(GFFFile.Structure structure)
structure
- To remove from the file.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |