# HG changeset patch # User Jaroslav Tulach # Date 1349050620 25200 # Node ID 462dbda6553393c5035f683bc8b3ab560f84da28 # Parent bf8e571de593482f57905d3d515f88788bd110c1 Don't support other encodings than UTF-8 diff -r bf8e571de593 -r 462dbda65533 emul/src/main/java/java/lang/String.java --- a/emul/src/main/java/java/lang/String.java Sun Sep 30 17:12:18 2012 -0700 +++ b/emul/src/main/java/java/lang/String.java Sun Sep 30 17:17:00 2012 -0700 @@ -433,17 +433,17 @@ * * @since JDK1.1 */ - public String(byte bytes[], int offset, int length, String charsetName) - throws UnsupportedEncodingException - { - if (charsetName == null) - throw new NullPointerException("charsetName"); - checkBounds(bytes, offset, length); - char[] v = StringCoding.decode(charsetName, bytes, offset, length); - this.offset = 0; - this.count = v.length; - this.value = v; - } +// public String(byte bytes[], int offset, int length, String charsetName) +// throws UnsupportedEncodingException +// { +// if (charsetName == null) +// throw new NullPointerException("charsetName"); +// checkBounds(bytes, offset, length); +// char[] v = StringCoding.decode(charsetName, bytes, offset, length); +// this.offset = 0; +// this.count = v.length; +// this.value = v; +// } /** * Constructs a new {@code String} by decoding the specified subarray of @@ -510,11 +510,11 @@ * * @since JDK1.1 */ - public String(byte bytes[], String charsetName) - throws UnsupportedEncodingException - { - this(bytes, 0, bytes.length, charsetName); - } +// public String(byte bytes[], String charsetName) +// throws UnsupportedEncodingException +// { +// this(bytes, 0, bytes.length, charsetName); +// } /** * Constructs a new {@code String} by decoding the specified array of @@ -942,12 +942,12 @@ * * @since JDK1.1 */ - public byte[] getBytes(String charsetName) - throws UnsupportedEncodingException - { - if (charsetName == null) throw new NullPointerException(); - return StringCoding.encode(charsetName, value, offset, count); - } +// public byte[] getBytes(String charsetName) +// throws UnsupportedEncodingException +// { +// if (charsetName == null) throw new NullPointerException(); +// return StringCoding.encode(charsetName, value, offset, count); +// } /** * Encodes this {@code String} into a sequence of bytes using the given