Add basic store object
This commit is contained in:
@@ -15,12 +15,14 @@ public class DataFile implements Closeable
|
||||
|
||||
private static final int SECTOR_SIZE = 520;
|
||||
|
||||
private final Store store;
|
||||
private final int datafileId;
|
||||
private final RandomAccessFile dat;
|
||||
private final byte[] readCachedBuffer = new byte[SECTOR_SIZE];
|
||||
|
||||
public DataFile(int id, File file) throws FileNotFoundException
|
||||
public DataFile(Store store, int id, File file) throws FileNotFoundException
|
||||
{
|
||||
this.store = store;
|
||||
this.datafileId = id;
|
||||
dat = new RandomAccessFile(file, "rw");
|
||||
}
|
||||
|
||||
@@ -12,12 +12,14 @@ public class IndexFile
|
||||
private static final Logger logger = LoggerFactory.getLogger(IndexFile.class);
|
||||
private static final int INDEX_ENTRY_LEN = 6;
|
||||
|
||||
private int indexFileId;
|
||||
private RandomAccessFile idx;
|
||||
private final Store store;
|
||||
private final int indexFileId;
|
||||
private final RandomAccessFile idx;
|
||||
private final byte[] buffer = new byte[6];
|
||||
|
||||
public IndexFile(int indexFileId, File file) throws FileNotFoundException
|
||||
public IndexFile(Store store, int indexFileId, File file) throws FileNotFoundException
|
||||
{
|
||||
this.store = store;
|
||||
this.indexFileId = indexFileId;
|
||||
this.idx = new RandomAccessFile(file, "rw");
|
||||
}
|
||||
|
||||
5
src/main/java/net/runelite/cache/fs/Store.java
vendored
Normal file
5
src/main/java/net/runelite/cache/fs/Store.java
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
package net.runelite.cache.fs;
|
||||
|
||||
public class Store
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user