mirror of
https://github.com/corda/corda.git
synced 2025-06-13 12:48:18 +00:00
add ability to append to files
This commit is contained in:
committed by
Joel Dice
parent
f0f35a920f
commit
1daa93d3c4
@ -22,14 +22,19 @@ public class FileOutputStream extends OutputStream {
|
||||
}
|
||||
|
||||
public FileOutputStream(String path) throws IOException {
|
||||
fd = open(path);
|
||||
this(path, false);
|
||||
}
|
||||
|
||||
public FileOutputStream(String path, boolean append) throws IOException {
|
||||
fd = open(path, append);
|
||||
}
|
||||
|
||||
|
||||
public FileOutputStream(File file) throws IOException {
|
||||
this(file.getPath());
|
||||
}
|
||||
|
||||
private static native int open(String path) throws IOException;
|
||||
private static native int open(String path, boolean append) throws IOException;
|
||||
|
||||
private static native void write(int fd, int c) throws IOException;
|
||||
|
||||
|
Reference in New Issue
Block a user