mirror of
https://github.com/corda/corda.git
synced 2025-01-05 20:54:13 +00:00
add a few classpath methods
This commit is contained in:
parent
76d876c039
commit
4611c89dbe
@ -1,5 +1,7 @@
|
||||
package java.lang;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
public final class String implements Comparable<String> {
|
||||
private Object data;
|
||||
private int offset;
|
||||
@ -30,6 +32,15 @@ public final class String implements Comparable<String> {
|
||||
this(data, 0, data.length);
|
||||
}
|
||||
|
||||
public String(byte[] data, String charset)
|
||||
throws UnsupportedEncodingException
|
||||
{
|
||||
this(data);
|
||||
if (! charset.equals("US-ASCII")) {
|
||||
throw new UnsupportedEncodingException(charset);
|
||||
}
|
||||
}
|
||||
|
||||
private String(Object data, int offset, int length, boolean copy) {
|
||||
int l;
|
||||
if (data instanceof char[]) {
|
||||
|
@ -29,6 +29,10 @@ public class Thread implements Runnable {
|
||||
classLoader = current.classLoader;
|
||||
}
|
||||
|
||||
public Thread(Runnable task, String name) {
|
||||
this(task);
|
||||
}
|
||||
|
||||
public synchronized void start() {
|
||||
if (peer != 0) {
|
||||
throw new IllegalStateException("thread already started");
|
||||
|
@ -3,6 +3,8 @@ package java.util;
|
||||
public interface Collection<T> extends Iterable<T> {
|
||||
public int size();
|
||||
|
||||
public boolean isEmpty();
|
||||
|
||||
public boolean contains(T element);
|
||||
|
||||
public boolean add(T element);
|
||||
|
Loading…
Reference in New Issue
Block a user