diff options
| author | Fuwn <[email protected]> | 2026-02-12 22:33:32 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-12 22:33:32 -0800 |
| commit | c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 (patch) | |
| tree | df9f48bf128a6c0186a8e91857d6ff30fe0e9f18 /NET/worlds/core/FastDataInput.java | |
| download | worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.tar.xz worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.zip | |
Initial commit
Diffstat (limited to 'NET/worlds/core/FastDataInput.java')
| -rw-r--r-- | NET/worlds/core/FastDataInput.java | 70 |
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; +} |