org.gamenet.application.mm8leveleditor.mm6
Class MM6VidEntry
java.lang.Object
org.gamenet.application.mm8leveleditor.lod.LodEntry
org.gamenet.application.mm8leveleditor.mm6.MM6VidEntry
- All Implemented Interfaces:
- Comparable, LodResource
- public class MM6VidEntry
- extends LodEntry
Method Summary |
protected void |
computeDataBasedOffsets()
|
protected void |
computeDataLength(RandomAccessFile raf,
long entryIndex,
long entryCount)
|
protected void |
computeEntryBasedOffsets()
|
byte[] |
getData()
|
protected long |
getDataHeaderOffset()
|
protected int |
getDataLength()
|
String |
getDataName()
|
long |
getDataOffset()
|
String |
getEntryName()
|
String |
getFileName()
|
protected String |
getFileType()
|
FormatConverter |
getFormatConverter()
|
String |
getFormatConverterFileType()
|
protected int |
getNewDataLength(LodResource lodResourceDataSource)
|
protected int |
getOffsetInEntryHeaderForDataSegmentOffset()
|
String |
getResourceType()
|
String |
getTextDescription()
|
protected int |
getUpdatedDataLength(LodResource lodResourceDataSource)
|
protected void |
readDataHeader()
|
long |
rewriteData(OutputStream outputStream,
long dataOffset)
|
long |
rewriteEntry(OutputStream outputStream,
long entryListOffset,
long entryOffset,
long dataOffset)
|
long |
updateData(LodResource lodResourceDataSource,
OutputStream outputStream,
long dataOffset)
|
long |
updateEntry(LodResource lodResourceDataSource,
OutputStream outputStream,
long entryListOffset,
long entryOffset,
long dataOffset)
|
private long |
writeEntry(String name,
long uncompressedDataLength,
OutputStream outputStream,
long entryListOffset,
long entryOffset,
long dataOffset)
|
long |
writeNewData(LodResource lodResourceDataSource,
OutputStream outputStream,
long dataOffset)
|
long |
writeNewEntry(LodResource lodResourceDataSource,
OutputStream outputStream,
long entryListOffset,
long entryOffset,
long dataOffset)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ENTRY_NAME__ENTRY_HEADER_OFFSET
protected static final int ENTRY_NAME__ENTRY_HEADER_OFFSET
- See Also:
- Constant Field Values
ENTRY_NAME__ENTRY_HEADER_MAX_LENGTH
protected static final int ENTRY_NAME__ENTRY_HEADER_MAX_LENGTH
- See Also:
- Constant Field Values
DATA_SEGMENT_OFFSET__ENTRY_HEADER_OFFSET
protected static final int DATA_SEGMENT_OFFSET__ENTRY_HEADER_OFFSET
- See Also:
- Constant Field Values
dataLength
protected long dataLength
MM6VidEntry
public MM6VidEntry(LodFile lodFile,
long headerOffset)
throws IOException
computeDataLength
protected void computeDataLength(RandomAccessFile raf,
long entryIndex,
long entryCount)
throws IOException
- Throws:
IOException
getTextDescription
public String getTextDescription()
computeEntryBasedOffsets
protected void computeEntryBasedOffsets()
- Specified by:
computeEntryBasedOffsets
in class LodEntry
computeDataBasedOffsets
protected void computeDataBasedOffsets()
- Specified by:
computeDataBasedOffsets
in class LodEntry
getDataOffset
public long getDataOffset()
- Specified by:
getDataOffset
in class LodEntry
getDataLength
protected int getDataLength()
- Specified by:
getDataLength
in class LodEntry
readDataHeader
protected void readDataHeader()
throws IOException
- Overrides:
readDataHeader
in class LodEntry
- Throws:
IOException
getData
public byte[] getData()
throws IOException
- Throws:
IOException
getResourceType
public String getResourceType()
getOffsetInEntryHeaderForDataSegmentOffset
protected int getOffsetInEntryHeaderForDataSegmentOffset()
getFileName
public String getFileName()
- Specified by:
getFileName
in class LodEntry
getFileType
protected String getFileType()
getEntryName
public String getEntryName()
- Specified by:
getEntryName
in class LodEntry
getFormatConverter
public FormatConverter getFormatConverter()
- Overrides:
getFormatConverter
in class LodEntry
getFormatConverterFileType
public String getFormatConverterFileType()
- Overrides:
getFormatConverterFileType
in class LodEntry
getNewDataLength
protected int getNewDataLength(LodResource lodResourceDataSource)
throws IOException
- Throws:
IOException
getUpdatedDataLength
protected int getUpdatedDataLength(LodResource lodResourceDataSource)
throws IOException
- Throws:
IOException
writeEntry
private long writeEntry(String name,
long uncompressedDataLength,
OutputStream outputStream,
long entryListOffset,
long entryOffset,
long dataOffset)
throws IOException
- Throws:
IOException
rewriteEntry
public long rewriteEntry(OutputStream outputStream,
long entryListOffset,
long entryOffset,
long dataOffset)
throws IOException
- Specified by:
rewriteEntry
in class LodEntry
- Throws:
IOException
writeNewEntry
public long writeNewEntry(LodResource lodResourceDataSource,
OutputStream outputStream,
long entryListOffset,
long entryOffset,
long dataOffset)
throws IOException
- Specified by:
writeNewEntry
in class LodEntry
- Parameters:
outputStream
- entryOffset
- to start writing the entrydataOffset
- to start writing the data for this entry
- Returns:
- dataOffset for next entry
- Throws:
IOException
updateEntry
public long updateEntry(LodResource lodResourceDataSource,
OutputStream outputStream,
long entryListOffset,
long entryOffset,
long dataOffset)
throws IOException
- Specified by:
updateEntry
in class LodEntry
- Throws:
IOException
writeNewData
public long writeNewData(LodResource lodResourceDataSource,
OutputStream outputStream,
long dataOffset)
throws IOException
- Specified by:
writeNewData
in class LodEntry
- Parameters:
outputStream
- dataOffset
- to start writing this datum
- Returns:
- dataOffset for next datum
- Throws:
IOException
updateData
public long updateData(LodResource lodResourceDataSource,
OutputStream outputStream,
long dataOffset)
throws IOException
- Specified by:
updateData
in class LodEntry
- Throws:
IOException
rewriteData
public long rewriteData(OutputStream outputStream,
long dataOffset)
throws IOException
- Specified by:
rewriteData
in class LodEntry
- Throws:
IOException
getDataHeaderOffset
protected long getDataHeaderOffset()
- Specified by:
getDataHeaderOffset
in class LodEntry
getDataName
public String getDataName()
- Specified by:
getDataName
in class LodEntry