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

x33g5p2x  于2022-01-31 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(182)

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

UnsupportedCharsetException.initCause介绍

暂无

代码示例

代码示例来源:origin: haraldk/TwelveMonkeys

private InputStream createXMPStream(final String pXMP, final String pCharsetName) {
  try {
    return new SequenceInputStream(
        Collections.enumeration(
            Arrays.asList(
                createRandomStream(79),
                new ByteArrayInputStream(pXMP.getBytes(pCharsetName)),
                createRandomStream(31)
            )
        )
    );
  }
  catch (UnsupportedEncodingException e) {
    UnsupportedCharsetException uce = new UnsupportedCharsetException(pCharsetName);
    uce.initCause(e);
    throw uce;
  }
}

代码示例来源:origin: com.ibm.icu/icu4j-charset

UnsupportedCharsetException e2 = new UnsupportedCharsetException(
    icuCanonicalName + ": " + "Could not load " + className + ". Exception: " + cause);
e2.initCause(cause);
throw e2;

代码示例来源:origin: com.twelvemonkeys.imageio/imageio-metadata

private InputStream createXMPStream(final String pXMP, final String pCharsetName) {
  try {
    return new SequenceInputStream(
        Collections.enumeration(
            Arrays.asList(
                createRandomStream(79),
                new ByteArrayInputStream(pXMP.getBytes(pCharsetName)),
                createRandomStream(31)
            )
        )
    );
  }
  catch (UnsupportedEncodingException e) {
    UnsupportedCharsetException uce = new UnsupportedCharsetException(pCharsetName);
    uce.initCause(e);
    throw uce;
  }
}

代码示例来源:origin: com.twelvemonkeys.imageio/twelvemonkeys-imageio-metadata

private InputStream createXMPStream(final String pXMP, final String pCharsetName) {
  try {
    return new SequenceInputStream(
        Collections.enumeration(
            Arrays.asList(
                createRandomStream(79),
                new ByteArrayInputStream(pXMP.getBytes(pCharsetName)),
                createRandomStream(31)
            )
        )
    );
  }
  catch (UnsupportedEncodingException e) {
    UnsupportedCharsetException uce = new UnsupportedCharsetException(pCharsetName);
    uce.initCause(e);
    throw uce;
  }
}

代码示例来源:origin: org.jboss.modules/jboss-modules

} catch (Throwable t) {
  final UnsupportedCharsetException uce = new UnsupportedCharsetException(value);
  uce.initCause(t);
  throw uce;

相关文章