RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
com.osroyale.fs.cache.FileSystem Class Reference

Public Member Functions

Archive getArchive (int id)
Cache getCache (int id)
ByteBuffer getFile (int cacheId, int indexId) throws IOException
ByteBuffer getArchiveHashes () throws IOException

Static Public Member Functions

static FileSystem create (String directory) throws IOException

Static Public Attributes

static final int CONFIG_INDEX = 0
static final int MODEL_INDEX = 1
static final int ANIMATION_INDEX = 2
static final int MIDI_INDEX = 3
static final int MAP_INDEX = 4
static final int TITLE_ARCHIVE = 1
static final int CONFIG_ARCHIVE = 2
static final int INTERFACE_ARCHIVE = 3
static final int MEDIA_ARCHIVE = 4
static final int MANIFEST_ARCHIVE = 5
static final int TEXTURES_ARCHIVE = 6
static final int WORD_ARCHIVE = 7
static final int SOUND_ARCHIVE = 8

Detailed Description

Represents a file system of Caches and Archives.

Author
Ryley Kimmel ryley.nosp@m..kim.nosp@m.mel@l.nosp@m.ive..nosp@m.com
Artem Batutin artem.nosp@m.batu.nosp@m.tin@g.nosp@m.mail.nosp@m..com

Definition at line 49 of file FileSystem.java.

Member Function Documentation

◆ create()

FileSystem com.osroyale.fs.cache.FileSystem.create ( String directory) throws IOException
inlinestatic

Constructs and initializes a FileSystem from the specified
directory
.

Parameters
directoryThe directory of the FileSystem.
Returns
The constructed FileSystem instance.
Exceptions
IOExceptionIf some I/O exception occurs.

Definition at line 136 of file FileSystem.java.

◆ getArchive()

Archive com.osroyale.fs.cache.FileSystem.getArchive ( int id)
inline

Gets an Archive for the specified id, this method fails-fast if no archive can be found.

Parameters
idThe id of the Archive to fetch.
Returns
The Archive for the specified id.
Exceptions
NullPointerExceptionIf the archive cannot be found.

Definition at line 173 of file FileSystem.java.

◆ getArchiveHashes()

ByteBuffer com.osroyale.fs.cache.FileSystem.getArchiveHashes ( ) throws IOException
inline

Returns the cached archiveHashes if they exist, otherwise they are calculated and cached for future use.

Returns
The hashes of each Archive.
Exceptions
IOExceptionIf some I/O exception occurs.

Definition at line 214 of file FileSystem.java.

◆ getCache()

Cache com.osroyale.fs.cache.FileSystem.getCache ( int id)
inline

Gets a Cache for the specified id, this method fails-fast if no cache can be found.

Parameters
idThe id of the Cache to fetch.
Returns
The Cache for the specified id.
Exceptions
NullPointerExceptionIf the cache cannot be found.

Definition at line 186 of file FileSystem.java.

◆ getFile()

ByteBuffer com.osroyale.fs.cache.FileSystem.getFile ( int cacheId,
int indexId ) throws IOException
inline

Returns a ByteBuffer of file data for the specified index within the specified Cache.

Parameters
cacheIdThe id of the cache.
indexIdThe id of the index within the cache.
Returns
A ByteBuffer of file data for the specified index.
Exceptions
IOExceptionIf some I/O exception occurs.

Definition at line 200 of file FileSystem.java.

Member Data Documentation

◆ ANIMATION_INDEX

final int com.osroyale.fs.cache.FileSystem.ANIMATION_INDEX = 2
static

Represents the id of the animations cache.

Definition at line 58 of file FileSystem.java.

◆ CONFIG_ARCHIVE

final int com.osroyale.fs.cache.FileSystem.CONFIG_ARCHIVE = 2
static

Represents the id of the configurations archive.

Definition at line 70 of file FileSystem.java.

◆ CONFIG_INDEX

final int com.osroyale.fs.cache.FileSystem.CONFIG_INDEX = 0
static

Represents the id of the configurations cache.

Definition at line 52 of file FileSystem.java.

◆ INTERFACE_ARCHIVE

final int com.osroyale.fs.cache.FileSystem.INTERFACE_ARCHIVE = 3
static

Represents the id of the interface archive.

Definition at line 73 of file FileSystem.java.

◆ MANIFEST_ARCHIVE

final int com.osroyale.fs.cache.FileSystem.MANIFEST_ARCHIVE = 5
static

Represents the id of the manifest archive.

Definition at line 79 of file FileSystem.java.

◆ MAP_INDEX

final int com.osroyale.fs.cache.FileSystem.MAP_INDEX = 4
static

Represents the id of the tool.mapviewer and landscape cache.

Definition at line 64 of file FileSystem.java.

◆ MEDIA_ARCHIVE

final int com.osroyale.fs.cache.FileSystem.MEDIA_ARCHIVE = 4
static

Represents the id of the media and sprite archive.

Definition at line 76 of file FileSystem.java.

◆ MIDI_INDEX

final int com.osroyale.fs.cache.FileSystem.MIDI_INDEX = 3
static

Represents the id of the sounds and music cache.

Definition at line 61 of file FileSystem.java.

◆ MODEL_INDEX

final int com.osroyale.fs.cache.FileSystem.MODEL_INDEX = 1
static

Represents the id of the model cache.

Definition at line 55 of file FileSystem.java.

◆ SOUND_ARCHIVE

final int com.osroyale.fs.cache.FileSystem.SOUND_ARCHIVE = 8
static

Represents the id of the sound and music archive.

Definition at line 91 of file FileSystem.java.

◆ TEXTURES_ARCHIVE

final int com.osroyale.fs.cache.FileSystem.TEXTURES_ARCHIVE = 6
static

Represents the id of the textures archive.

Definition at line 82 of file FileSystem.java.

◆ TITLE_ARCHIVE

final int com.osroyale.fs.cache.FileSystem.TITLE_ARCHIVE = 1
static

Represents the id of the title screen archive.

Definition at line 67 of file FileSystem.java.

◆ WORD_ARCHIVE

final int com.osroyale.fs.cache.FileSystem.WORD_ARCHIVE = 7
static

Represents the id of the word archive - user for storing profane or illegal words not allowed to be spoken in-game.

Definition at line 88 of file FileSystem.java.


The documentation for this class was generated from the following file: