/** * Converts the byte array to a string using the named charset. * * <p>The behavior when the bytes cannot be decoded by the named charset * is unspecified. Use {@link java.nio.charset.CharsetDecoder} for more control. * * @throws NullPointerException * if {@code data == null}. * @throws UnsupportedEncodingException * if {@code charsetName} is not supported. */ public String(byte[] data, String charsetName) throws UnsupportedEncodingException { this(data, 0, data.length, Charset.forNameUEE(charsetName)); }
/** * Converts the byte array to a string using the named charset. * * <p>The behavior when the bytes cannot be decoded by the named charset * is unspecified. Use {@link java.nio.charset.CharsetDecoder} for more control. * * @throws NullPointerException * if {@code data == null}. * @throws IndexOutOfBoundsException * if {@code byteCount < 0 || offset < 0 || offset + byteCount > data.length}. * @throws UnsupportedEncodingException * if the named charset is not supported. */ public String(byte[] data, int offset, int byteCount, String charsetName) throws UnsupportedEncodingException { this(data, offset, byteCount, Charset.forNameUEE(charsetName)); }
/** * Returns a new byte array containing the characters of this string encoded using the * named charset. * * <p>The behavior when this string cannot be represented in the named charset * is unspecified. Use {@link java.nio.charset.CharsetEncoder} for more control. * * @throws UnsupportedEncodingException if the charset is not supported */ public byte[] getBytes(String charsetName) throws UnsupportedEncodingException { return getBytes(Charset.forNameUEE(charsetName)); }
/** * Converts the byte array to a string using the named charset. * * <p>The behavior when the bytes cannot be decoded by the named charset * is unspecified. Use {@link java.nio.charset.CharsetDecoder} for more control. * * @throws NullPointerException * if {@code data == null}. * @throws UnsupportedEncodingException * if {@code charsetName} is not supported. */ public String(byte[] data, String charsetName) throws UnsupportedEncodingException { this(data, 0, data.length, Charset.forNameUEE(charsetName)); }
/** * Converts the byte array to a string using the named charset. * * <p>The behavior when the bytes cannot be decoded by the named charset * is unspecified. Use {@link java.nio.charset.CharsetDecoder} for more control. * * @throws NullPointerException * if {@code data == null}. * @throws UnsupportedEncodingException * if {@code charsetName} is not supported. */ public String(byte[] data, String charsetName) throws UnsupportedEncodingException { this(data, 0, data.length, Charset.forNameUEE(charsetName)); }
/** * Converts the byte array to a string using the named charset. * * <p>The behavior when the bytes cannot be decoded by the named charset * is unspecified. Use {@link java.nio.charset.CharsetDecoder} for more control. * * @throws NullPointerException * if {@code data == null}. * @throws UnsupportedEncodingException * if {@code charsetName} is not supported. */ public String(byte[] data, String charsetName) throws UnsupportedEncodingException { this(data, 0, data.length, Charset.forNameUEE(charsetName)); }
/** * Converts the byte array to a string using the named charset. * * <p>The behavior when the bytes cannot be decoded by the named charset * is unspecified. Use {@link java.nio.charset.CharsetDecoder} for more control. * * @throws NullPointerException * if {@code data == null}. * @throws UnsupportedEncodingException * if {@code charsetName} is not supported. */ public String(byte[] data, String charsetName) throws UnsupportedEncodingException { this(data, 0, data.length, Charset.forNameUEE(charsetName)); }
/** * Converts the byte array to a string using the named charset. * * <p>The behavior when the bytes cannot be decoded by the named charset * is unspecified. Use {@link java.nio.charset.CharsetDecoder} for more control. * * @throws NullPointerException * if {@code data == null}. * @throws UnsupportedEncodingException * if {@code charsetName} is not supported. */ public String(byte[] data, String charsetName) throws UnsupportedEncodingException { this(data, 0, data.length, Charset.forNameUEE(charsetName)); }
/** * Converts the byte array to a string using the named charset. * * <p>The behavior when the bytes cannot be decoded by the named charset * is unspecified. Use {@link java.nio.charset.CharsetDecoder} for more control. * * @throws NullPointerException * if {@code data == null}. * @throws IndexOutOfBoundsException * if {@code byteCount < 0 || offset < 0 || offset + byteCount > data.length}. * @throws UnsupportedEncodingException * if the named charset is not supported. */ public String(byte[] data, int offset, int byteCount, String charsetName) throws UnsupportedEncodingException { this(data, offset, byteCount, Charset.forNameUEE(charsetName)); }
/** * Converts the byte array to a string using the named charset. * * <p>The behavior when the bytes cannot be decoded by the named charset * is unspecified. Use {@link java.nio.charset.CharsetDecoder} for more control. * * @throws NullPointerException * if {@code data == null}. * @throws UnsupportedEncodingException * if {@code charsetName} is not supported. */ public String(byte[] data, String charsetName) throws UnsupportedEncodingException { this(data, 0, data.length, Charset.forNameUEE(charsetName)); }
/** * Converts the byte array to a string using the named charset. * * <p>The behavior when the bytes cannot be decoded by the named charset * is unspecified. Use {@link java.nio.charset.CharsetDecoder} for more control. * * @throws NullPointerException * if {@code data == null}. * @throws IndexOutOfBoundsException * if {@code byteCount < 0 || offset < 0 || offset + byteCount > data.length}. * @throws UnsupportedEncodingException * if the named charset is not supported. */ public String(byte[] data, int offset, int byteCount, String charsetName) throws UnsupportedEncodingException { this(data, offset, byteCount, Charset.forNameUEE(charsetName)); }
/** * Converts the byte array to a string using the named charset. * * <p>The behavior when the bytes cannot be decoded by the named charset * is unspecified. Use {@link java.nio.charset.CharsetDecoder} for more control. * * @throws NullPointerException * if {@code data == null}. * @throws IndexOutOfBoundsException * if {@code byteCount < 0 || offset < 0 || offset + byteCount > data.length}. * @throws UnsupportedEncodingException * if the named charset is not supported. */ public String(byte[] data, int offset, int byteCount, String charsetName) throws UnsupportedEncodingException { this(data, offset, byteCount, Charset.forNameUEE(charsetName)); }
/** * Converts the byte array to a string using the named charset. * * <p>The behavior when the bytes cannot be decoded by the named charset * is unspecified. Use {@link java.nio.charset.CharsetDecoder} for more control. * * @throws NullPointerException * if {@code data == null}. * @throws IndexOutOfBoundsException * if {@code byteCount < 0 || offset < 0 || offset + byteCount > data.length}. * @throws UnsupportedEncodingException * if the named charset is not supported. */ public String(byte[] data, int offset, int byteCount, String charsetName) throws UnsupportedEncodingException { this(data, offset, byteCount, Charset.forNameUEE(charsetName)); }
/** * Converts the byte array to a string using the named charset. * * <p>The behavior when the bytes cannot be decoded by the named charset * is unspecified. Use {@link java.nio.charset.CharsetDecoder} for more control. * * @throws NullPointerException * if {@code data == null}. * @throws IndexOutOfBoundsException * if {@code byteCount < 0 || offset < 0 || offset + byteCount > data.length}. * @throws UnsupportedEncodingException * if the named charset is not supported. */ public String(byte[] data, int offset, int byteCount, String charsetName) throws UnsupportedEncodingException { this(data, offset, byteCount, Charset.forNameUEE(charsetName)); }
/** * Returns a new byte array containing the characters of this string encoded using the * named charset. * * <p>The behavior when this string cannot be represented in the named charset * is unspecified. Use {@link java.nio.charset.CharsetEncoder} for more control. * * @throws UnsupportedEncodingException if the charset is not supported */ public byte[] getBytes(String charsetName) throws UnsupportedEncodingException { return getBytes(Charset.forNameUEE(charsetName)); }
/** * Returns a new byte array containing the characters of this string encoded using the * named charset. * * <p>The behavior when this string cannot be represented in the named charset * is unspecified. Use {@link java.nio.charset.CharsetEncoder} for more control. * * @throws UnsupportedEncodingException if the charset is not supported */ public byte[] getBytes(String charsetName) throws UnsupportedEncodingException { return getBytes(Charset.forNameUEE(charsetName)); }
/** * Returns a new byte array containing the characters of this string encoded using the * named charset. * * <p>The behavior when this string cannot be represented in the named charset * is unspecified. Use {@link java.nio.charset.CharsetEncoder} for more control. * * @throws UnsupportedEncodingException if the charset is not supported */ public byte[] getBytes(String charsetName) throws UnsupportedEncodingException { return getBytes(Charset.forNameUEE(charsetName)); }
/** * Returns a new byte array containing the characters of this string encoded using the * named charset. * * <p>The behavior when this string cannot be represented in the named charset * is unspecified. Use {@link java.nio.charset.CharsetEncoder} for more control. * * @throws UnsupportedEncodingException if the charset is not supported */ public byte[] getBytes(String charsetName) throws UnsupportedEncodingException { return getBytes(Charset.forNameUEE(charsetName)); }
/** * Returns a new byte array containing the characters of this string encoded using the * named charset. * * <p>The behavior when this string cannot be represented in the named charset * is unspecified. Use {@link java.nio.charset.CharsetEncoder} for more control. * * @throws UnsupportedEncodingException if the charset is not supported */ public byte[] getBytes(String charsetName) throws UnsupportedEncodingException { return getBytes(Charset.forNameUEE(charsetName)); }
/** * Returns a new byte array containing the characters of this string encoded using the * named charset. * * <p>The behavior when this string cannot be represented in the named charset * is unspecified. Use {@link java.nio.charset.CharsetEncoder} for more control. * * @throws UnsupportedEncodingException if the charset is not supported */ public byte[] getBytes(String charsetName) throws UnsupportedEncodingException { return getBytes(Charset.forNameUEE(charsetName)); }