java.nio.charset.UnsupportedCharsetException#toString ( )源码实例Demo

下面列出了java.nio.charset.UnsupportedCharsetException#toString ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: datacollector   文件: XmlParserConfig.java
public DataParserFactory getParserFactory(Stage.Context context) {
  DataParserFactoryBuilder builder = new DataParserFactoryBuilder(context, DataFormat.XML.getParserFormat());
  try {

    builder.setCharset(Charset.forName(charset));
  } catch (UnsupportedCharsetException ex) {
    throw new RuntimeException("It should not happen: " + ex.toString(), ex);
  }

  builder.setRemoveCtrlChars(removeCtrlChars).setMaxDataLen(-1)
      .setConfig(XmlDataParserFactory.RECORD_ELEMENT_KEY, xmlRecordElement)
      .setConfig(XmlDataParserFactory.INCLUDE_FIELD_XPATH_ATTRIBUTES_KEY, includeFieldXpathAttributes)
      .setConfig(XmlDataParserFactory.RECORD_ELEMENT_XPATH_NAMESPACES_KEY, xPathNamespaceContext)
      .setConfig(XmlDataParserFactory.USE_FIELD_ATTRIBUTES, outputFieldAttributes);
  return builder.build();
}
 
源代码2 项目: hadoop   文件: DefaultStringifier.java
@Override
public T fromString(String str) throws IOException {
  try {
    byte[] bytes = Base64.decodeBase64(str.getBytes("UTF-8"));
    inBuf.reset(bytes, bytes.length);
    T restored = deserializer.deserialize(null);
    return restored;
  } catch (UnsupportedCharsetException ex) {
    throw new IOException(ex.toString());
  }
}
 
源代码3 项目: big-c   文件: DefaultStringifier.java
@Override
public T fromString(String str) throws IOException {
  try {
    byte[] bytes = Base64.decodeBase64(str.getBytes("UTF-8"));
    inBuf.reset(bytes, bytes.length);
    T restored = deserializer.deserialize(null);
    return restored;
  } catch (UnsupportedCharsetException ex) {
    throw new IOException(ex.toString());
  }
}
 
源代码4 项目: RDFS   文件: DefaultStringifier.java
public T fromString(String str) throws IOException {
  try {
    byte[] bytes = Base64.decodeBase64(str.getBytes("UTF-8"));
    inBuf.reset(bytes, bytes.length);
    T restored = deserializer.deserialize(null);
    return restored;
  } catch (UnsupportedCharsetException ex) {
    throw new IOException(ex.toString());
  }
}
 
源代码5 项目: hadoop-gpu   文件: DefaultStringifier.java
public T fromString(String str) throws IOException {
  try {
    byte[] bytes = Base64.decodeBase64(str.getBytes("UTF-8"));
    inBuf.reset(bytes, bytes.length);
    T restored = deserializer.deserialize(null);
    return restored;
  } catch (UnsupportedCharsetException ex) {
    throw new IOException(ex.toString());
  }
}