public class RegionFile
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
RegionFile.ChunkBuffer |
Modifier and Type | Field and Description |
---|---|
private int[] |
chunkTimestamps |
private java.io.RandomAccessFile |
dataFile |
private static byte[] |
EMPTY_SECTOR |
private java.io.File |
fileName |
private static boolean |
FORGE_ENABLE_EXTENDED_SAVE |
private long |
lastModified |
private int[] |
offsets |
private java.util.List<java.lang.Boolean> |
sectorFree |
private int |
sizeDelta |
Constructor and Description |
---|
RegionFile(java.io.File fileNameIn) |
Modifier and Type | Method and Description |
---|---|
boolean |
chunkExists(int x,
int z)
Deprecated.
|
void |
close() |
java.io.DataInputStream |
getChunkDataInputStream(int x,
int z) |
java.io.DataOutputStream |
getChunkDataOutputStream(int x,
int z) |
private int |
getOffset(int x,
int z) |
boolean |
isChunkSaved(int x,
int z) |
private boolean |
outOfBounds(int x,
int z) |
private void |
setChunkTimestamp(int x,
int z,
int timestamp) |
private void |
setOffset(int x,
int z,
int offset) |
private void |
write(int sectorNumber,
byte[] data,
int length) |
protected void |
write(int x,
int z,
byte[] data,
int length) |
private static final boolean FORGE_ENABLE_EXTENDED_SAVE
private static final byte[] EMPTY_SECTOR
private final java.io.File fileName
private java.io.RandomAccessFile dataFile
private final int[] offsets
private final int[] chunkTimestamps
private java.util.List<java.lang.Boolean> sectorFree
private int sizeDelta
private long lastModified
@Deprecated public boolean chunkExists(int x, int z)
@Nullable public java.io.DataInputStream getChunkDataInputStream(int x, int z)
@Nullable public java.io.DataOutputStream getChunkDataOutputStream(int x, int z)
protected void write(int x, int z, byte[] data, int length)
private void write(int sectorNumber, byte[] data, int length) throws java.io.IOException
java.io.IOException
private boolean outOfBounds(int x, int z)
private int getOffset(int x, int z)
public boolean isChunkSaved(int x, int z)
private void setOffset(int x, int z, int offset) throws java.io.IOException
java.io.IOException
private void setChunkTimestamp(int x, int z, int timestamp) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException