summaryrefslogtreecommitdiff
path: root/NET/worlds/core/FastDataInput.java
blob: 75a71e799985dd22c36fb5ff0495fe625d8328ac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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;
}