Package net.runelite.cache.fs.flat
Class FlatStorage
- java.lang.Object
-
- net.runelite.cache.fs.flat.FlatStorage
-
- All Implemented Interfaces:
AutoCloseable,Storage
public class FlatStorage extends Object implements Storage
A Storage that stores the cache as a series of flat files, designed to be git revisioned.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFlatStorage()FlatStorage(File directory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidinit(Store store)protected String[]listFlatcacheFiles()byte[]load(int index, int archive)voidload(Store store)protected InputStreamopenReader(String filename)protected OutputStreamopenWriter(String filename)voidsave(Store store)voidstore(int index, int archive, byte[] bytes)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.runelite.cache.fs.Storage
loadArchive, saveArchive
-
-
-
-
Field Detail
-
EXTENSION
protected static final String EXTENSION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FlatStorage
public FlatStorage(File directory) throws IOException
- Throws:
IOException
-
FlatStorage
protected FlatStorage()
-
-
Method Detail
-
openReader
protected InputStream openReader(String filename) throws IOException
- Throws:
IOException
-
openWriter
protected OutputStream openWriter(String filename) throws IOException
- Throws:
IOException
-
listFlatcacheFiles
protected String[] listFlatcacheFiles() throws IOException
- Throws:
IOException
-
init
public void init(Store store) throws IOException
- Specified by:
initin interfaceStorage- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStorage- Throws:
IOException
-
load
public void load(Store store) throws IOException
- Specified by:
loadin interfaceStorage- Throws:
IOException
-
save
public void save(Store store) throws IOException
- Specified by:
savein interfaceStorage- Throws:
IOException
-
-