org.jagatoo.loaders.models.md2.pak
Class PAKListing

java.lang.Object
  extended by org.jagatoo.loaders.models.md2.pak.PAKListing

public class PAKListing
extends java.lang.Object

The directory listing from inside a Quake 2 PAK file.


Constructor Summary
PAKListing(PAKHeader header, byte[] totalData)
          Creates new PAKListing.
 
Method Summary
 int getFileLength(java.lang.String name)
          Retrieves the length of a given file.
 java.util.List<java.lang.String> getFilenames()
           
 int getFileOffset(java.lang.String name)
          Retrieves the offset to a given file name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PAKListing

public PAKListing(PAKHeader header,
                  byte[] totalData)
           throws java.io.IOException
Creates new PAKListing.

Parameters:
header - The PAK header of this file
totalData - The file to read the listing from
Throws:
java.io.IOException
Method Detail

getFilenames

public java.util.List<java.lang.String> getFilenames()
Returns:
a List of the names of all contained files in the PAKArchive

getFileOffset

public int getFileOffset(java.lang.String name)
Retrieves the offset to a given file name.

Returns:
The offset to the given file or -1 if file not found

getFileLength

public int getFileLength(java.lang.String name)
Retrieves the length of a given file.

Returns:
The length of the file or -1 if file not found