mirror of
https://github.com/corda/corda.git
synced 2025-06-13 12:48:18 +00:00
quick sketch of java/io/*
This commit is contained in:
@ -1,13 +1,27 @@
|
||||
package java.lang;
|
||||
|
||||
public abstract class System {
|
||||
public static final Output out = new Output();
|
||||
public static final Output err = out;
|
||||
import java.io.PrintStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileDescriptor;
|
||||
|
||||
public abstract class System {
|
||||
static {
|
||||
loadLibrary("natives");
|
||||
}
|
||||
|
||||
public static final PrintStream out = new PrintStream
|
||||
(new BufferedOutputStream(new FileOutputStream(FileDescriptor.out)), true);
|
||||
|
||||
public static final PrintStream err = new PrintStream
|
||||
(new BufferedOutputStream(new FileOutputStream(FileDescriptor.err)), true);
|
||||
|
||||
public static final InputStream in
|
||||
= new BufferedInputStream(new FileInputStream(FileDescriptor.in));
|
||||
|
||||
public static native void arraycopy(Object src, int srcOffset, Object dst,
|
||||
int dstOffset, int length);
|
||||
|
||||
@ -26,13 +40,4 @@ public abstract class System {
|
||||
public static void exit(int code) {
|
||||
Runtime.getRuntime().exit(code);
|
||||
}
|
||||
|
||||
public static class Output {
|
||||
public synchronized native void print(String s);
|
||||
|
||||
public synchronized void println(String s) {
|
||||
print(s);
|
||||
print(getProperty("line.separator"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user