31 /** |
31 /** |
32 * Allows different platforms to call different native methods |
32 * Allows different platforms to call different native methods |
33 * for read and write operations. |
33 * for read and write operations. |
34 */ |
34 */ |
35 |
35 |
36 class SocketDispatcher extends NativeDispatcher { |
36 public class SocketDispatcher extends NativeDispatcher { |
37 |
37 |
38 int read(FileDescriptor fd, long address, int len) throws IOException { |
38 protected int read(FileDescriptor fd, long address, int len) |
|
39 throws IOException { |
39 return FileDispatcherImpl.read0(fd, address, len); |
40 return FileDispatcherImpl.read0(fd, address, len); |
40 } |
41 } |
41 |
42 |
42 long readv(FileDescriptor fd, long address, int len) throws IOException { |
43 protected long readv(FileDescriptor fd, long address, int len) |
|
44 throws IOException { |
43 return FileDispatcherImpl.readv0(fd, address, len); |
45 return FileDispatcherImpl.readv0(fd, address, len); |
44 } |
46 } |
45 |
47 |
46 int write(FileDescriptor fd, long address, int len) throws IOException { |
48 protected int write(FileDescriptor fd, long address, int len) |
|
49 throws IOException { |
47 return FileDispatcherImpl.write0(fd, address, len); |
50 return FileDispatcherImpl.write0(fd, address, len); |
48 } |
51 } |
49 |
52 |
50 long writev(FileDescriptor fd, long address, int len) throws IOException { |
53 protected long writev(FileDescriptor fd, long address, int len) |
|
54 throws IOException { |
51 return FileDispatcherImpl.writev0(fd, address, len); |
55 return FileDispatcherImpl.writev0(fd, address, len); |
52 } |
56 } |
53 |
57 |
54 void close(FileDescriptor fd) throws IOException { |
58 protected void close(FileDescriptor fd) throws IOException { |
55 FileDispatcherImpl.close0(fd); |
59 FileDispatcherImpl.close0(fd); |
56 } |
60 } |
57 |
61 |
58 void preClose(FileDescriptor fd) throws IOException { |
62 public void preClose(FileDescriptor fd) throws IOException { |
59 FileDispatcherImpl.preClose0(fd); |
63 FileDispatcherImpl.preClose0(fd); |
60 } |
64 } |
61 } |
65 } |