• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Feature类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.codehaus.jackson.JsonGenerator.Feature的典型用法代码示例。如果您正苦于以下问题:Java Feature类的具体用法?Java Feature怎么用?Java Feature使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Feature类属于org.codehaus.jackson.JsonGenerator包,在下文中一共展示了Feature类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: _writePPFieldName

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
protected final void _writePPFieldName(String paramString, boolean paramBoolean)
  throws IOException, JsonGenerationException
{
  if (paramBoolean)
    this._cfgPrettyPrinter.writeObjectEntrySeparator(this);
  while (isEnabled(JsonGenerator.Feature.QUOTE_FIELD_NAMES))
  {
    if (this._outputTail >= this._outputEnd)
      _flushBuffer();
    char[] arrayOfChar1 = this._outputBuffer;
    int i = this._outputTail;
    this._outputTail = (i + 1);
    arrayOfChar1[i] = '"';
    _writeString(paramString);
    if (this._outputTail >= this._outputEnd)
      _flushBuffer();
    char[] arrayOfChar2 = this._outputBuffer;
    int j = this._outputTail;
    this._outputTail = (j + 1);
    arrayOfChar2[j] = '"';
    return;
    this._cfgPrettyPrinter.beforeObjectEntries(this);
  }
  _writeString(paramString);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:26,代码来源:WriterBasedGenerator.java


示例2: _writePPFieldName

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
protected final void _writePPFieldName(String paramString, boolean paramBoolean)
{
  if (paramBoolean)
    this._cfgPrettyPrinter.writeObjectEntrySeparator(this);
  while (isEnabled(JsonGenerator.Feature.QUOTE_FIELD_NAMES))
  {
    if (this._outputTail >= this._outputEnd)
      _flushBuffer();
    char[] arrayOfChar1 = this._outputBuffer;
    int i = this._outputTail;
    this._outputTail = (i + 1);
    arrayOfChar1[i] = '"';
    _writeString(paramString);
    if (this._outputTail >= this._outputEnd)
      _flushBuffer();
    char[] arrayOfChar2 = this._outputBuffer;
    int j = this._outputTail;
    this._outputTail = (j + 1);
    arrayOfChar2[j] = '"';
    return;
    this._cfgPrettyPrinter.beforeObjectEntries(this);
  }
  _writeString(paramString);
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:25,代码来源:WriterBasedGenerator.java


示例3: enableDisableJSONGeneratorFeature

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
private void enableDisableJSONGeneratorFeature(JsonGenerator jg) {
  jg.enable(Feature.ESCAPE_NON_ASCII);
  jg.disable(Feature.AUTO_CLOSE_TARGET); 
  jg.setPrettyPrinter(new DefaultPrettyPrinter());
  if(PDXTOJJSON_UNQUOTEFIELDNAMES)
    jg.disable(Feature.QUOTE_FIELD_NAMES);
}
 
开发者ID:gemxd,项目名称:gemfirexd-oss,代码行数:8,代码来源:PdxToJSON.java


示例4: createJsonGenerator

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
private JsonGenerator createJsonGenerator(OutputStream output)
		throws IOException {
	JsonFactory jsonFactory = new JsonFactory();
	JsonGenerator jsonGenerator = jsonFactory.createJsonGenerator(output);
	jsonGenerator.enable(Feature.AUTO_CLOSE_TARGET);
	jsonGenerator.useDefaultPrettyPrinter();
	return jsonGenerator;
}
 
开发者ID:dream-lab,项目名称:goffish_v2,代码行数:9,代码来源:GoFSJSONResource.java


示例5: WriterBasedGenerator

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
public WriterBasedGenerator(IOContext paramIOContext, int paramInt, ObjectCodec paramObjectCodec, Writer paramWriter)
{
  super(paramInt, paramObjectCodec);
  this._ioContext = paramIOContext;
  this._writer = paramWriter;
  this._outputBuffer = paramIOContext.allocConcatBuffer();
  this._outputEnd = this._outputBuffer.length;
  if (isEnabled(JsonGenerator.Feature.ESCAPE_NON_ASCII))
    setHighestNonEscapedChar(127);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:11,代码来源:WriterBasedGenerator.java


示例6: _writeFieldName

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
protected void _writeFieldName(String paramString, boolean paramBoolean)
  throws IOException, JsonGenerationException
{
  if (this._cfgPrettyPrinter != null)
  {
    _writePPFieldName(paramString, paramBoolean);
    return;
  }
  if (1 + this._outputTail >= this._outputEnd)
    _flushBuffer();
  if (paramBoolean)
  {
    char[] arrayOfChar3 = this._outputBuffer;
    int k = this._outputTail;
    this._outputTail = (k + 1);
    arrayOfChar3[k] = ',';
  }
  if (!isEnabled(JsonGenerator.Feature.QUOTE_FIELD_NAMES))
  {
    _writeString(paramString);
    return;
  }
  char[] arrayOfChar1 = this._outputBuffer;
  int i = this._outputTail;
  this._outputTail = (i + 1);
  arrayOfChar1[i] = '"';
  _writeString(paramString);
  if (this._outputTail >= this._outputEnd)
    _flushBuffer();
  char[] arrayOfChar2 = this._outputBuffer;
  int j = this._outputTail;
  this._outputTail = (j + 1);
  arrayOfChar2[j] = '"';
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:35,代码来源:WriterBasedGenerator.java


示例7: close

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
public void close()
  throws IOException
{
  super.close();
  if ((this._outputBuffer != null) && (isEnabled(JsonGenerator.Feature.AUTO_CLOSE_JSON_CONTENT)))
    while (true)
    {
      JsonWriteContext localJsonWriteContext = getOutputContext();
      if (localJsonWriteContext.inArray())
      {
        writeEndArray();
        continue;
      }
      if (!localJsonWriteContext.inObject())
        break;
      writeEndObject();
    }
  _flushBuffer();
  if ((this._ioContext.isResourceManaged()) || (isEnabled(JsonGenerator.Feature.AUTO_CLOSE_TARGET)))
    this._writer.close();
  while (true)
  {
    _releaseBuffers();
    return;
    this._writer.flush();
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:28,代码来源:WriterBasedGenerator.java


示例8: flush

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
public final void flush()
  throws IOException
{
  _flushBuffer();
  if ((this._writer != null) && (isEnabled(JsonGenerator.Feature.FLUSH_PASSED_TO_STREAM)))
    this._writer.flush();
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:8,代码来源:WriterBasedGenerator.java


示例9: writeNumber

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
public void writeNumber(double paramDouble)
  throws IOException, JsonGenerationException
{
  if ((this._cfgNumbersAsStrings) || (((Double.isNaN(paramDouble)) || (Double.isInfinite(paramDouble))) && (isEnabled(JsonGenerator.Feature.QUOTE_NON_NUMERIC_NUMBERS))))
  {
    writeString(String.valueOf(paramDouble));
    return;
  }
  _verifyValueWrite("write number");
  writeRaw(String.valueOf(paramDouble));
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:12,代码来源:WriterBasedGenerator.java


示例10: Utf8Generator

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
public Utf8Generator(IOContext paramIOContext, int paramInt, ObjectCodec paramObjectCodec, OutputStream paramOutputStream)
{
  super(paramInt, paramObjectCodec);
  this._ioContext = paramIOContext;
  this._outputStream = paramOutputStream;
  this._bufferRecyclable = true;
  this._outputBuffer = paramIOContext.allocWriteEncodingBuffer();
  this._outputEnd = this._outputBuffer.length;
  this._outputMaxContiguous = (this._outputEnd >> 3);
  this._charBuffer = paramIOContext.allocConcatBuffer();
  this._charBufferLength = this._charBuffer.length;
  if (isEnabled(JsonGenerator.Feature.ESCAPE_NON_ASCII))
    setHighestNonEscapedChar(127);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:15,代码来源:Utf8Generator.java


示例11: _writeFieldName

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
protected final void _writeFieldName(String paramString)
  throws IOException, JsonGenerationException
{
  if (!isEnabled(JsonGenerator.Feature.QUOTE_FIELD_NAMES))
  {
    _writeStringSegments(paramString);
    return;
  }
  if (this._outputTail >= this._outputEnd)
    _flushBuffer();
  byte[] arrayOfByte1 = this._outputBuffer;
  int i = this._outputTail;
  this._outputTail = (i + 1);
  arrayOfByte1[i] = 34;
  int j = paramString.length();
  if (j <= this._charBufferLength)
  {
    paramString.getChars(0, j, this._charBuffer, 0);
    if (j <= this._outputMaxContiguous)
    {
      if (j + this._outputTail > this._outputEnd)
        _flushBuffer();
      _writeStringSegment(this._charBuffer, 0, j);
    }
  }
  while (true)
  {
    if (this._outputTail >= this._outputEnd)
      _flushBuffer();
    byte[] arrayOfByte2 = this._outputBuffer;
    int k = this._outputTail;
    this._outputTail = (k + 1);
    arrayOfByte2[k] = 34;
    return;
    _writeStringSegments(this._charBuffer, 0, j);
    continue;
    _writeStringSegments(paramString);
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:40,代码来源:Utf8Generator.java


示例12: _writePPFieldName

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
protected final void _writePPFieldName(SerializableString paramSerializableString, boolean paramBoolean)
  throws IOException, JsonGenerationException
{
  if (paramBoolean)
    this._cfgPrettyPrinter.writeObjectEntrySeparator(this);
  while (true)
  {
    boolean bool = isEnabled(JsonGenerator.Feature.QUOTE_FIELD_NAMES);
    if (bool)
    {
      if (this._outputTail >= this._outputEnd)
        _flushBuffer();
      byte[] arrayOfByte2 = this._outputBuffer;
      int j = this._outputTail;
      this._outputTail = (j + 1);
      arrayOfByte2[j] = 34;
    }
    _writeBytes(paramSerializableString.asQuotedUTF8());
    if (bool)
    {
      if (this._outputTail >= this._outputEnd)
        _flushBuffer();
      byte[] arrayOfByte1 = this._outputBuffer;
      int i = this._outputTail;
      this._outputTail = (i + 1);
      arrayOfByte1[i] = 34;
    }
    return;
    this._cfgPrettyPrinter.beforeObjectEntries(this);
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:32,代码来源:Utf8Generator.java


示例13: close

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
public void close()
  throws IOException
{
  super.close();
  if ((this._outputBuffer != null) && (isEnabled(JsonGenerator.Feature.AUTO_CLOSE_JSON_CONTENT)))
    while (true)
    {
      JsonWriteContext localJsonWriteContext = getOutputContext();
      if (localJsonWriteContext.inArray())
      {
        writeEndArray();
        continue;
      }
      if (!localJsonWriteContext.inObject())
        break;
      writeEndObject();
    }
  _flushBuffer();
  if ((this._ioContext.isResourceManaged()) || (isEnabled(JsonGenerator.Feature.AUTO_CLOSE_TARGET)))
    this._outputStream.close();
  while (true)
  {
    _releaseBuffers();
    return;
    this._outputStream.flush();
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:28,代码来源:Utf8Generator.java


示例14: flush

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
public final void flush()
  throws IOException
{
  _flushBuffer();
  if ((this._outputStream != null) && (isEnabled(JsonGenerator.Feature.FLUSH_PASSED_TO_STREAM)))
    this._outputStream.flush();
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:8,代码来源:Utf8Generator.java


示例15: JsonGeneratorBase

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
protected JsonGeneratorBase(int paramInt, ObjectCodec paramObjectCodec)
{
  this._features = paramInt;
  this._writeContext = JsonWriteContext.createRootContext();
  this._objectCodec = paramObjectCodec;
  this._cfgNumbersAsStrings = isEnabled(JsonGenerator.Feature.WRITE_NUMBERS_AS_STRINGS);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:8,代码来源:JsonGeneratorBase.java


示例16: disable

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
public JsonGenerator disable(JsonGenerator.Feature paramFeature)
{
  this._features &= (0xFFFFFFFF ^ paramFeature.getMask());
  if (paramFeature == JsonGenerator.Feature.WRITE_NUMBERS_AS_STRINGS)
    this._cfgNumbersAsStrings = false;
  do
    return this;
  while (paramFeature != JsonGenerator.Feature.ESCAPE_NON_ASCII);
  setHighestNonEscapedChar(0);
  return this;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:12,代码来源:JsonGeneratorBase.java


示例17: enable

import org.codehaus.jackson.JsonGenerator.Feature; //导入依赖的package包/类
public JsonGenerator enable(JsonGenerator.Feature paramFeature)
{
  this._features |= paramFeature.getMask();
  if (paramFeature == JsonGenerator.Feature.WRITE_NUMBERS_AS_STRINGS)
    this._cfgNumbersAsStrings = true;
  do
    return this;
  while (paramFeature != JsonGenerator.Feature.ESCAPE_NON_ASCII);
  setHighestNonEscapedChar(127);
  return this;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:12,代码来源:JsonGeneratorBase.java



注:本文中的org.codehaus.jackson.JsonGenerator.Feature类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PropertyImpl类代码示例发布时间:2022-05-23
下一篇:
Java VKApiUser类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap