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

Public Member Functions

ByteBuffer get (final int indexId) throws IOException

Static Public Attributes

static final int INDEX_SIZE = 6
static final int SECTOR_HEADER_SIZE = 8
static final int SECTOR_SIZE = 520

Protected Member Functions

 Cache (SeekableByteChannel sectorChannel, SeekableByteChannel indexChannel, int id)

Detailed Description

Represents a Sector and Index cache.

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

Definition at line 42 of file Cache.java.

Constructor & Destructor Documentation

◆ Cache()

com.osroyale.fs.cache.Cache.Cache ( SeekableByteChannel sectorChannel,
SeekableByteChannel indexChannel,
int id )
inlineprotected

Constructs a new Cache with the specified sector and index channels and id.

Parameters
sectorChannelThe cache sectors byte channel.
indexChannelThe cache sectors index channel.
idThis caches id.

Definition at line 95 of file Cache.java.

Member Function Documentation

◆ get()

ByteBuffer com.osroyale.fs.cache.Cache.get ( final int indexId) throws IOException
inline

Gets a ByteBuffer of data within this cache for the specified index id.

Parameters
indexIdThe file id to get.
Returns
A wrapped byte buffer of the specified files data, never null.
Exceptions
IOExceptionIf some I/O exception occurs.

Definition at line 109 of file Cache.java.

Member Data Documentation

◆ INDEX_SIZE

final int com.osroyale.fs.cache.Cache.INDEX_SIZE = 6
static

Represents the size of a index file. Calculating the total size of a index file. the total size may be that of a long.

Definition at line 48 of file Cache.java.

◆ SECTOR_HEADER_SIZE

final int com.osroyale.fs.cache.Cache.SECTOR_HEADER_SIZE = 8
static

Represents the size of a Sectors header. Calculating the total size of the sector header. the total size may be that of a long.

Definition at line 54 of file Cache.java.

◆ SECTOR_SIZE

final int com.osroyale.fs.cache.Cache.SECTOR_SIZE = 520
static

Represents the size of a Sectors header. Calculating the total size of the sector header. the total size may be that of a long

Definition at line 60 of file Cache.java.


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