support for non-bristlecone socket i/o
[IRC.git] / Robust / src / ClassLibrary / SocketJava.java
1 public class Socket {
2     /* Data pending flag */
3     /* File Descriptor */
4     int fd;
5     
6     Socket() {
7     }
8     
9     int setFD(int filed) {
10         fd=filed;
11     }
12
13     public int read(byte[] b) {
14         return nativeRead(b);
15     }
16     public void write(byte[] b) {
17         nativeWrite(b);
18     }
19
20     private native int nativeRead(byte[] b);
21     private native void nativeWrite(byte[] b);
22     private native void nativeClose();
23
24     public void close() {
25         nativeClose();
26     }
27 }