com.mmbreakfast.unlod.lod
Class LodFile
java.lang.Object
com.mmbreakfast.unlod.lod.LodFile
- Direct Known Subclasses:
- EnglishDLodFile, MM6LodFile, MM6NewLodFile, MM6SndFile, MM6SpritesLodFile, MM6VidFile, MM7NewLodFile
- public abstract class LodFile
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ENTRY_CONSTRUCTOR
protected static final Class[] ENTRY_CONSTRUCTOR
file
protected File file
in
protected RandomAccessFileInputStream in
fileHeader
protected byte[] fileHeader
entries
protected HashMap entries
orderedEntries
protected List orderedEntries
FILE_HEADER_SIZE_OFFSET
protected static final long FILE_HEADER_SIZE_OFFSET
- See Also:
- Constant Field Values
FILE_SIZE_MINUS_FILE_HEADER_SIZE_OFFSET
protected static final long FILE_SIZE_MINUS_FILE_HEADER_SIZE_OFFSET
- See Also:
- Constant Field Values
LodFile
protected LodFile(File file,
RandomAccessFileInputStream inputStream)
throws IOException,
InvalidLodFileException
getFile
public File getFile()
getFileName
public String getFileName()
verifySignature
protected void verifySignature(RandomAccessFile raf)
throws IOException,
InvalidLodFileException
- Throws:
IOException
InvalidLodFileException
verify
protected void verify(RandomAccessFile raf)
throws IOException,
InvalidLodFileException
- Throws:
IOException
InvalidLodFileException
readFileHeader
protected byte[] readFileHeader(RandomAccessFile raf)
throws IOException
- Throws:
IOException
readEntryCount
protected long readEntryCount(RandomAccessFile raf)
throws IOException,
InvalidLodFileException
- Throws:
IOException
InvalidLodFileException
readEntries
protected void readEntries(RandomAccessFile raf,
long entryCount)
throws IOException
- Throws:
IOException
findFileBasedModifiedLodResource
private LodResource findFileBasedModifiedLodResource(List modifiedFileList,
LodEntry lodEntry)
findLodEntryForFile
public LodEntry findLodEntryForFile(File file)
getFileHeader
public byte[] getFileHeader()
getLodEntries
public Map getLodEntries()
findLodEntryByFileName
public LodEntry findLodEntryByFileName(String string)
throws NoSuchEntryException
- Throws:
NoSuchEntryException
getNextEntry
protected LodEntry getNextEntry(int entriesSoFar,
RandomAccessFile raf)
throws IOException
- Throws:
IOException
write
public void write(TaskObserver taskObserver,
RandomAccessFile randomAccessFile,
List modifiedFileList,
LodResource resourceToImport)
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
updateByAppendingData
public void updateByAppendingData(TaskObserver taskObserver,
RandomAccessFile randomAccessFile,
LodResource resourceToImport)
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
getRandomAccessFileInputStream
public RandomAccessFileInputStream getRandomAccessFileInputStream()
getFileHeaderSizeOffset
protected long getFileHeaderSizeOffset()
getFileSizeMinusFileHeaderSizeOffset
protected long getFileSizeMinusFileHeaderSizeOffset()
getHeaderOffset
public abstract long getHeaderOffset()
getEntriesNumberOffset
public abstract long getEntriesNumberOffset()
getEntryHeaderLength
public abstract long getEntryHeaderLength()
getEntryClass
public abstract Class getEntryClass()