1 public class FileInputStream {
4 public FileInputStream(String pathname) {
5 fd=nativeOpen(pathname.getBytes());
8 public FileInputStream(File path) {
9 fd=nativeOpen(path.getPath().getBytes());
15 private static native int nativeOpen(byte[] filename);
16 private static native int nativeRead(int fd, byte[] array, int numBytes);
17 private static native void nativeClose(int fd);
27 public int read(byte[] b) {
28 return nativeRead(fd, b, b.length);