summaryrefslogtreecommitdiff
path: root/NET/worlds/core/FastDataInput.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/core/FastDataInput.java')
-rw-r--r--NET/worlds/core/FastDataInput.java70
1 files changed, 70 insertions, 0 deletions
diff --git a/NET/worlds/core/FastDataInput.java b/NET/worlds/core/FastDataInput.java
new file mode 100644
index 0000000..75a71e7
--- /dev/null
+++ b/NET/worlds/core/FastDataInput.java
@@ -0,0 +1,70 @@
+package NET.worlds.core;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+public class FastDataInput implements DataInput {
+ private int nativeInfo;
+
+ public FastDataInput(String fileName) throws IOException {
+ nativeInit();
+ this.read(fileName);
+ }
+
+ public native void close();
+
+ @Override
+ public void readFully(byte[] b) throws IOException {
+ this.readFully(b, 0, b.length);
+ }
+
+ public static native void nativeInit();
+
+ @Override
+ public native void readFully(byte[] var1, int var2, int var3) throws IOException;
+
+ @Override
+ public native int skipBytes(int var1) throws IOException;
+
+ @Override
+ public native boolean readBoolean() throws IOException;
+
+ @Override
+ public native byte readByte() throws IOException;
+
+ @Override
+ public native int readUnsignedByte() throws IOException;
+
+ @Override
+ public native short readShort() throws IOException;
+
+ @Override
+ public native int readUnsignedShort() throws IOException;
+
+ @Override
+ public native char readChar() throws IOException;
+
+ @Override
+ public native int readInt() throws IOException;
+
+ @Override
+ public native long readLong() throws IOException;
+
+ @Override
+ public native float readFloat() throws IOException;
+
+ @Override
+ public native double readDouble() throws IOException;
+
+ @Override
+ public String readLine() throws IOException {
+ assert false;
+
+ return null;
+ }
+
+ @Override
+ public native String readUTF() throws IOException;
+
+ private native void read(String var1) throws IOException;
+}