NWNFiles
Class ERFFile

java.lang.Object
  |
  +--java.util.Observable
        |
        +--NWNFiles.NWNFile
              |
              +--NWNFiles.ERFFile

public class ERFFile
extends NWNFile

This class allows to handle bioware ERF files.


Nested Class Summary
 
Nested classes inherited from class NWNFiles.NWNFile
NWNFile.FileState
 
Field Summary
protected static String DefaultVersion
           The default file version.
protected static int HeaderSize
           
protected static int KeyStructureSize
           All known ERF file types.
static String[] KownERFFileTypes
           
protected static int ResourceListEntrySize
           
 
Fields inherited from class NWNFiles.NWNFile
currentLanguage, fileState
 
Constructor Summary
ERFFile()
           
ERFFile(File filePath)
           Does ...
ERFFile(File filePath, Observer observer)
           
 
Method Summary
 ERFResourceEntry addFile(File filePath)
           Does ...
 void addStringListElement(StringListElement newElement)
           Does ...
 void finalize()
           Does ...
 int getBuildDay()
           Number of days since january the 1st
 int getBuildYear()
           Number of years since 1900.
 File getFile()
           
 String getFileName()
           Represents ...
 int getFileNumber()
           Represents ...
 String getFileType()
           Does ...
 String getFileVersion()
           Does ...
 ERFResourceEntry getResourceEntry(int index)
           Does ...
 int getResRef()
           
 StringListElement getStringListElement(int index)
           Does ...
 int getStringTableElementNumber()
           Does ...
 boolean isModified()
           
 void load(File filePath)
           
 void removeFile(ERFResourceEntry resource)
           Does ...
 void removeStringListElement(StringListElement element)
           
 void save()
           Does ...
 void saveAs(File _file)
           Does ...
 void setFileName(String _fileName)
           Represents ...
 void setFileType(String _fileType)
           Does ...
protected  void setModified(boolean _modified)
           
 void setResRef(int _resRef)
           
 
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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DefaultVersion

protected static final String DefaultVersion

The default file version.

See Also:
Constant Field Values

HeaderSize

protected static final int HeaderSize
See Also:
Constant Field Values

KeyStructureSize

protected static final int KeyStructureSize

All known ERF file types.

See Also:
Constant Field Values

KownERFFileTypes

public static final String[] KownERFFileTypes

ResourceListEntrySize

protected static final int ResourceListEntrySize
See Also:
Constant Field Values
Constructor Detail

ERFFile

public ERFFile()

ERFFile

public ERFFile(File filePath)
        throws FileDoesNotExist,
               InvalidFile,
               NameTooLong,
               FileNotFoundException

Does ...

Parameters:
filePath - ...


ERFFile

public ERFFile(File filePath,
               Observer observer)
        throws FileDoesNotExist,
               InvalidFile,
               NameTooLong,
               FileNotFoundException
Method Detail

addFile

public ERFResourceEntry addFile(File filePath)
                         throws FileDoesNotExist,
                                InvalidFile,
                                NameTooLong,
                                FileNotFoundException

Does ...

Parameters:
filePath - ...

FileDoesNotExist
InvalidFile
NameTooLong
FileNotFoundException

addStringListElement

public void addStringListElement(StringListElement newElement)

Does ...

Parameters:
newElement - ...


finalize

public void finalize()

Does ...

Overrides:
finalize in class Object

getBuildDay

public int getBuildDay()

Number of days since january the 1st


getBuildYear

public int getBuildYear()

Number of years since 1900.


getFile

public File getFile()

getFileName

public String getFileName()

Represents ...


getFileNumber

public int getFileNumber()

Represents ...


getFileType

public String getFileType()

Does ...

Returns:
a String with ...


getFileVersion

public String getFileVersion()

Does ...

Returns:
a String with ...


getResourceEntry

public ERFResourceEntry getResourceEntry(int index)
                                  throws ArrayIndexOutOfBoundsException

Does ...

Parameters:
index - ...

Returns:
a ERFResourceEntry with ...

ArrayIndexOutOfBoundsException

getResRef

public int getResRef()

getStringListElement

public StringListElement getStringListElement(int index)
                                       throws ArrayIndexOutOfBoundsException

Does ...

Parameters:
index - ...

Returns:
a StringListElement with ...

ArrayIndexOutOfBoundsException

getStringTableElementNumber

public int getStringTableElementNumber()

Does ...

Returns:
a int with ...


isModified

public boolean isModified()

load

public void load(File filePath)
          throws FileDoesNotExist,
                 InvalidFile,
                 NameTooLong,
                 FileNotFoundException
FileDoesNotExist
InvalidFile
NameTooLong
FileNotFoundException

removeFile

public void removeFile(ERFResourceEntry resource)

Does ...

Parameters:
resource - ...


removeStringListElement

public void removeStringListElement(StringListElement element)

save

public void save()
          throws IOException

Does ...

IOException

saveAs

public void saveAs(File _file)
            throws IOException

Does ...

IOException

setFileName

public void setFileName(String _fileName)

Represents ...


setFileType

public void setFileType(String _fileType)
                 throws BadFileType

Does ...

Parameters:
_fileType - ...

BadFileType

setModified

protected void setModified(boolean _modified)

setResRef

public void setResRef(int _resRef)