public class ZippedMcRegionChunkStore extends McRegionChunkStore
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
folder |
protected java.util.zip.ZipFile |
zip |
protected java.io.File |
zipFile |
cachedReader, curFilename
CHUNK_SHIFTS
Constructor and Description |
---|
ZippedMcRegionChunkStore(java.io.File zipFile)
Create an instance.
|
ZippedMcRegionChunkStore(java.io.File zipFile,
java.lang.String folder)
Create an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close resources.
|
protected java.io.InputStream |
getInputStream(java.lang.String name,
java.lang.String worldName)
Get the input stream for a chunk file.
|
boolean |
isValid()
Returns whether the chunk store is of this type.
|
getChunkTag, getFilename, getReader
getChunk, toChunk
protected java.io.File zipFile
protected java.util.zip.ZipFile zip
protected java.lang.String folder
public ZippedMcRegionChunkStore(java.io.File zipFile, java.lang.String folder) throws java.io.IOException, java.util.zip.ZipException
zipFile
- the ZIP filefolder
- the folderjava.io.IOException
java.util.zip.ZipException
public ZippedMcRegionChunkStore(java.io.File zipFile) throws java.io.IOException, java.util.zip.ZipException
zipFile
- the ZIP filejava.io.IOException
java.util.zip.ZipException
protected java.io.InputStream getInputStream(java.lang.String name, java.lang.String worldName) throws java.io.IOException, DataException
McRegionChunkStore
getInputStream
in class McRegionChunkStore
name
- the name of the chunk fileworldName
- the world namejava.io.IOException
DataException
public void close() throws java.io.IOException
ChunkStore
close
in class McRegionChunkStore
java.io.IOException
- on I/O errorpublic boolean isValid()
ChunkStore
isValid
in class ChunkStore