java.nio.charset.Charset.forNameUEE()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(10.6k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中java.nio.charset.Charset.forNameUEE()方法的一些代码示例,展示了Charset.forNameUEE()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Charset.forNameUEE()方法的具体详情如下:
包路径:java.nio.charset.Charset
类名称:Charset
方法名:forNameUEE

Charset.forNameUEE介绍

[英]Equivalent to forName but only throws UnsupportedEncodingException, which is all pre-nio code claims to throw.
[中]相当于forName,但只抛出UnsupportedEncodingException,这是所有nio之前的代码声明要抛出的。

代码示例

代码示例来源:origin: robovm/robovm

/**
 * 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));
}

代码示例来源:origin: robovm/robovm

/**
 * 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));
}

代码示例来源:origin: robovm/robovm

/**
 * 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));
}

代码示例来源:origin: MobiVM/robovm

/**
 * 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));
}

代码示例来源:origin: ibinti/bugvm

/**
 * 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));
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * 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));
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * 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));
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * 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));
}

代码示例来源:origin: MobiVM/robovm

/**
 * 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));
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * 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));
}

代码示例来源:origin: ibinti/bugvm

/**
 * 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));
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * 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));
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * 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));
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * 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));
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * 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));
}

代码示例来源:origin: ibinti/bugvm

/**
 * 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));
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * 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));
}

代码示例来源:origin: MobiVM/robovm

/**
 * 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));
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * 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));
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * 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));
}

相关文章