public class TrueZipMcRegionChunkStore extends McRegionChunkStore
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
folder |
protected de.schlichtherle.util.zip.ZipFile |
zip |
protected java.io.File |
zipFile |
cachedReader, curFilename
CHUNK_SHIFTS, CHUNK_SHIFTS_Y
Constructor and Description |
---|
TrueZipMcRegionChunkStore(java.io.File zipFile)
Create an instance.
|
TrueZipMcRegionChunkStore(java.io.File zipFile,
java.lang.String folder)
Create an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
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, toChunk3d
protected java.io.File zipFile
protected de.schlichtherle.util.zip.ZipFile zip
protected java.lang.String folder
public TrueZipMcRegionChunkStore(java.io.File zipFile, java.lang.String folder) throws java.io.IOException, java.util.zip.ZipException
zipFile
- the ZIP filefolder
- the folder to look intojava.io.IOException
- if there is an error opening the zipjava.util.zip.ZipException
- if there is an error opening the zippublic TrueZipMcRegionChunkStore(java.io.File zipFile) throws java.io.IOException, java.util.zip.ZipException
zipFile
- the ZIP filejava.io.IOException
- if there is an error opening the zipjava.util.zip.ZipException
- if there is an error opening the zipprotected java.io.InputStream getInputStream(java.lang.String name, java.lang.String worldName) throws java.io.IOException, DataException
getInputStream
in class McRegionChunkStore
name
- the nameworldName
- the world namejava.io.IOException
- if there is an error getting the chunk dataDataException
- if there is an error getting the chunk datapublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class McRegionChunkStore
java.io.IOException
public boolean isValid()
ChunkStore
isValid
in class ChunkStore