mirror of
https://github.com/corda/corda.git
synced 2025-01-17 02:09:50 +00:00
Tie up some loose ends, implementing methods that are useful but not yet implemented.
This commit is contained in:
parent
5691ec87f0
commit
43a2cb7cc5
@ -62,10 +62,7 @@ public final class Math {
|
|||||||
return (int) Math.floor(v + 0.5);
|
return (int) Math.floor(v + 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static double random() {
|
public static native double random();
|
||||||
// TODO
|
|
||||||
throw new UnsupportedOperationException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static native double floor(double v);
|
public static native double floor(double v);
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ public abstract class Calendar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setTime(Date date) {
|
public void setTime(Date date) {
|
||||||
// TODO
|
time = date.getTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract void roll(int field, boolean up);
|
public abstract void roll(int field, boolean up);
|
||||||
|
@ -2,6 +2,7 @@ package java.util;
|
|||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
import java.io.PrintStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class Properties extends Hashtable {
|
public class Properties extends Hashtable {
|
||||||
@ -10,7 +11,16 @@ public class Properties extends Hashtable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void store(OutputStream out, String comment) throws IOException {
|
public void store(OutputStream out, String comment) throws IOException {
|
||||||
// TODO
|
PrintStream os = new PrintStream(out);
|
||||||
|
os.println("# " + comment);
|
||||||
|
for (Iterator it = entrySet().iterator();
|
||||||
|
it.hasNext();) {
|
||||||
|
Map.Entry entry = (Map.Entry)it.next();
|
||||||
|
os.print(entry.getKey());
|
||||||
|
os.print('=');
|
||||||
|
os.println(entry.getValue());
|
||||||
|
}
|
||||||
|
os.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getProperty(String key) {
|
public String getProperty(String key) {
|
||||||
|
@ -15,8 +15,10 @@ public class Inflater {
|
|||||||
private int length;
|
private int length;
|
||||||
private boolean needDictionary;
|
private boolean needDictionary;
|
||||||
private boolean finished;
|
private boolean finished;
|
||||||
|
private final boolean nowrap;
|
||||||
|
|
||||||
public Inflater(boolean nowrap) {
|
public Inflater(boolean nowrap) {
|
||||||
|
this.nowrap = nowrap;
|
||||||
peer = make(nowrap);
|
peer = make(nowrap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,8 +57,11 @@ public class Inflater {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void reset() {
|
public void reset() {
|
||||||
// TODO
|
dispose();
|
||||||
throw new UnsupportedOperationException();
|
peer = make(nowrap);
|
||||||
|
input = null;
|
||||||
|
offset = length = 0;
|
||||||
|
needDictionary = finished = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int inflate(byte[] output) throws DataFormatException {
|
public int inflate(byte[] output) throws DataFormatException {
|
||||||
|
Loading…
Reference in New Issue
Block a user