public class McRegionReader extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
CHUNK_HEADER_SIZE |
protected DataInputStream |
dataStream |
protected int[] |
offsets |
protected static int |
SECTOR_BYTES |
protected static int |
SECTOR_INTS |
protected ForwardSeekableInputStream |
stream |
protected static int |
VERSION_DEFLATE |
protected static int |
VERSION_GZIP |
| Constructor and Description |
|---|
McRegionReader(InputStream stream)
Construct the reader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the stream.
|
InputStream |
getChunkInputStream(Vector2D pos)
Gets the uncompressed data input stream for a chunk.
|
boolean |
hasChunk(int x,
int z)
Returns whether the file contains a chunk.
|
protected static final int VERSION_GZIP
protected static final int VERSION_DEFLATE
protected static final int SECTOR_BYTES
protected static final int SECTOR_INTS
public static final int CHUNK_HEADER_SIZE
protected ForwardSeekableInputStream stream
protected DataInputStream dataStream
protected int[] offsets
public McRegionReader(InputStream stream) throws DataException, IOException
stream - DataExceptionIOExceptionpublic InputStream getChunkInputStream(Vector2D pos) throws IOException, DataException
pos - IOExceptionDataExceptionpublic boolean hasChunk(int x,
int z)
x - z - public void close()
throws IOException
IOExceptionCopyright © 2010-2014. All Rights Reserved.