com.fasterxml.jackson.dataformat.yaml.YAMLFactory.isEnabled()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(143)

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

YAMLFactory.isEnabled介绍

[英]Check whether specified generator feature is enabled.
[中]检查指定的生成器功能是否已启用。

代码示例

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

protected Reader _createReader(InputStream in, JsonEncoding enc, IOContext ctxt) throws IOException
  {
    if (enc == null) {
      enc = JsonEncoding.UTF8;
    }
    // default to UTF-8 if encoding missing
    if (enc == JsonEncoding.UTF8) {
      boolean autoClose = ctxt.isResourceManaged() || isEnabled(JsonParser.Feature.AUTO_CLOSE_SOURCE);
      return new UTF8Reader(in, autoClose);
//          return new InputStreamReader(in, UTF8);
    }
    return new InputStreamReader(in, enc.getJavaName());
  }

代码示例来源:origin: com.fasterxml.jackson.dataformat/jackson-dataformat-yaml

protected Reader _createReader(InputStream in, JsonEncoding enc, IOContext ctxt) throws IOException
  {
    if (enc == null) {
      enc = JsonEncoding.UTF8;
    }
    // default to UTF-8 if encoding missing
    if (enc == JsonEncoding.UTF8) {
      boolean autoClose = ctxt.isResourceManaged() || isEnabled(JsonParser.Feature.AUTO_CLOSE_SOURCE);
      return new UTF8Reader(in, autoClose);
//          return new InputStreamReader(in, UTF8);
    }
    return new InputStreamReader(in, enc.getJavaName());
  }

代码示例来源:origin: FasterXML/jackson-dataformats-text

protected Reader _createReader(InputStream in, JsonEncoding enc, IOContext ctxt) throws IOException
  {
    if (enc == null) {
      enc = JsonEncoding.UTF8;
    }
    // default to UTF-8 if encoding missing
    if (enc == JsonEncoding.UTF8) {
      boolean autoClose = ctxt.isResourceManaged() || isEnabled(StreamReadFeature.AUTO_CLOSE_SOURCE);
      return new UTF8Reader(in, autoClose);
//          return new InputStreamReader(in, UTF8);
    }
    return new InputStreamReader(in, enc.getJavaName());
  }

相关文章