package NET.worlds.core; import java.io.DataInput; import java.io.DataInputStream; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOException; public class FastDataInput implements DataInput { private DataInputStream dataInputStream; public FastDataInput(String fileName) throws IOException { nativeInit(); this.dataInputStream = new DataInputStream(new BufferedInputStream(new FileInputStream(fileName))); } public void close() { if (this.dataInputStream != null) { try { this.dataInputStream.close(); } catch (IOException e) { } } } @Override public void readFully(byte[] b) throws IOException { this.dataInputStream.readFully(b); } public static void nativeInit() { } @Override public void readFully(byte[] var1, int var2, int var3) throws IOException { this.dataInputStream.readFully(var1, var2, var3); } @Override public int skipBytes(int var1) throws IOException { return this.dataInputStream.skipBytes(var1); } @Override public boolean readBoolean() throws IOException { return this.dataInputStream.readBoolean(); } @Override public byte readByte() throws IOException { return this.dataInputStream.readByte(); } @Override public int readUnsignedByte() throws IOException { return this.dataInputStream.readUnsignedByte(); } @Override public short readShort() throws IOException { return this.dataInputStream.readShort(); } @Override public int readUnsignedShort() throws IOException { return this.dataInputStream.readUnsignedShort(); } @Override public char readChar() throws IOException { return this.dataInputStream.readChar(); } @Override public int readInt() throws IOException { return this.dataInputStream.readInt(); } @Override public long readLong() throws IOException { return this.dataInputStream.readLong(); } @Override public float readFloat() throws IOException { return this.dataInputStream.readFloat(); } @Override public double readDouble() throws IOException { return this.dataInputStream.readDouble(); } @Override public String readLine() throws IOException { return this.dataInputStream.readLine(); } @Override public String readUTF() throws IOException { return this.dataInputStream.readUTF(); } }