public class MpqFile
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ADJUSTED_ENCRYPTED |
static int |
COMPRESSED |
static int |
DELETED |
static int |
ENCRYPTED |
static int |
EXISTS |
static int |
SINGLEUNIT |
| Constructor and Description |
|---|
MpqFile(java.nio.MappedByteBuffer buf,
BlockTable.Block b,
int sectorSize,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
extractToFile(java.io.File f) |
void |
extractToOutputStream(java.io.OutputStream writer) |
int |
getBlockIndex() |
int |
getCompSize() |
int |
getFlags() |
java.lang.String |
getName() |
int |
getNormalSize() |
int |
getOffset() |
void |
setBlockIndex(int blockIndex) |
void |
setOffset(int newOffset) |
java.lang.String |
toString() |
void |
writeFileAndBlock(BlockTable.Block newBlock,
java.nio.MappedByteBuffer writeBuffer)
Write file and block.
|
static void |
writeFileAndBlock(byte[] fileArr,
BlockTable.Block b,
java.nio.MappedByteBuffer buf,
int sectorSize)
Write file and block.
|
static void |
writeFileAndBlock(java.io.File f,
BlockTable.Block b,
java.nio.MappedByteBuffer buf,
int sectorSize)
Write file and block.
|
public static final int COMPRESSED
public static final int ENCRYPTED
public static final int SINGLEUNIT
public static final int ADJUSTED_ENCRYPTED
public static final int EXISTS
public static final int DELETED
public MpqFile(java.nio.MappedByteBuffer buf,
BlockTable.Block b,
int sectorSize,
java.lang.String name)
throws java.io.IOException,
JMpqException
java.io.IOExceptionJMpqExceptionpublic int getBlockIndex()
public void setBlockIndex(int blockIndex)
public java.lang.String toString()
toString in class java.lang.Objectpublic void setOffset(int newOffset)
public int getOffset()
public int getCompSize()
public int getNormalSize()
public int getFlags()
public java.lang.String getName()
public void extractToFile(java.io.File f)
throws java.io.IOException
java.io.IOExceptionpublic void extractToOutputStream(java.io.OutputStream writer)
throws java.io.IOException
java.io.IOExceptionpublic void writeFileAndBlock(BlockTable.Block newBlock, java.nio.MappedByteBuffer writeBuffer)
newBlock - the new blockwriteBuffer - the write bufferpublic static void writeFileAndBlock(java.io.File f,
BlockTable.Block b,
java.nio.MappedByteBuffer buf,
int sectorSize)
f - the fb - the bbuf - the bufsectorSize - the sector sizepublic static void writeFileAndBlock(byte[] fileArr,
BlockTable.Block b,
java.nio.MappedByteBuffer buf,
int sectorSize)
fileArr - the file arrb - the bbuf - the bufsectorSize - the sector size