mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
a static jni method takes the jclass for that method as its second argument; simplify pad() and divide(), and rename divide() to ceiling(); sketch FileInputStream.cpp and FileOutputStream.cpp
This commit is contained in:
@ -1,16 +1,28 @@
|
||||
package java.io;
|
||||
|
||||
public class FileOutputStream extends OutputStream {
|
||||
private final FileDescriptor fd;
|
||||
private final int fd;
|
||||
|
||||
public FileOutputStream(FileDescriptor fd) {
|
||||
this.fd = fd;
|
||||
this.fd = fd.value;
|
||||
}
|
||||
|
||||
public native void write(int c) throws IOException;
|
||||
public static native void write(int fd, int c) throws IOException;
|
||||
|
||||
public native void write(byte[] b, int offset, int length)
|
||||
public static native void write(int fd, byte[] b, int offset, int length)
|
||||
throws IOException;
|
||||
|
||||
public native void close() throws IOException;
|
||||
public static native void close(int fd) throws IOException;
|
||||
|
||||
public void write(int c) throws IOException {
|
||||
write(fd, c);
|
||||
}
|
||||
|
||||
public void write(byte[] b, int offset, int length) throws IOException {
|
||||
write(fd, b, offset, length);
|
||||
}
|
||||
|
||||
public void close() throws IOException {
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user