Java 类org.codehaus.jackson.JsonGenerator.Feature 实例源码

项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
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);
}
项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
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);
}
项目:ingress-indonesia-dev    文件:WriterBasedGenerator.java   
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);
}
项目:gemfirexd-oss    文件:PdxToJSON.java   
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);
}
项目:gemfirexd-oss    文件:PdxToJSON.java   
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);
}
项目:goffish_v2    文件:GoFSJSONResource.java   
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;
}
项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
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);
}
项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
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] = '"';
}
项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
protected final void _writePPFieldName(SerializableString paramSerializableString, boolean paramBoolean)
  throws IOException, JsonGenerationException
{
  if (paramBoolean)
    this._cfgPrettyPrinter.writeObjectEntrySeparator(this);
  char[] arrayOfChar1;
  while (true)
  {
    arrayOfChar1 = paramSerializableString.asQuotedChars();
    if (!isEnabled(JsonGenerator.Feature.QUOTE_FIELD_NAMES))
      break;
    if (this._outputTail >= this._outputEnd)
      _flushBuffer();
    char[] arrayOfChar2 = this._outputBuffer;
    int i = this._outputTail;
    this._outputTail = (i + 1);
    arrayOfChar2[i] = '"';
    writeRaw(arrayOfChar1, 0, arrayOfChar1.length);
    if (this._outputTail >= this._outputEnd)
      _flushBuffer();
    char[] arrayOfChar3 = this._outputBuffer;
    int j = this._outputTail;
    this._outputTail = (j + 1);
    arrayOfChar3[j] = '"';
    return;
    this._cfgPrettyPrinter.beforeObjectEntries(this);
  }
  writeRaw(arrayOfChar1, 0, arrayOfChar1.length);
}
项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
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();
  }
}
项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
public final void flush()
  throws IOException
{
  _flushBuffer();
  if ((this._writer != null) && (isEnabled(JsonGenerator.Feature.FLUSH_PASSED_TO_STREAM)))
    this._writer.flush();
}
项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
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));
}
项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
public void writeNumber(float paramFloat)
  throws IOException, JsonGenerationException
{
  if ((this._cfgNumbersAsStrings) || (((Float.isNaN(paramFloat)) || (Float.isInfinite(paramFloat))) && (isEnabled(JsonGenerator.Feature.QUOTE_NON_NUMERIC_NUMBERS))))
  {
    writeString(String.valueOf(paramFloat));
    return;
  }
  _verifyValueWrite("write number");
  writeRaw(String.valueOf(paramFloat));
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
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);
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
public Utf8Generator(IOContext paramIOContext, int paramInt1, ObjectCodec paramObjectCodec, OutputStream paramOutputStream, byte[] paramArrayOfByte, int paramInt2, boolean paramBoolean)
{
  super(paramInt1, paramObjectCodec);
  this._ioContext = paramIOContext;
  this._outputStream = paramOutputStream;
  this._bufferRecyclable = paramBoolean;
  this._outputTail = paramInt2;
  this._outputBuffer = paramArrayOfByte;
  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);
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
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);
  }
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
protected final void _writeFieldName(SerializableString paramSerializableString)
  throws IOException, JsonGenerationException
{
  byte[] arrayOfByte1 = paramSerializableString.asQuotedUTF8();
  if (!isEnabled(JsonGenerator.Feature.QUOTE_FIELD_NAMES))
  {
    _writeBytes(arrayOfByte1);
    return;
  }
  if (this._outputTail >= this._outputEnd)
    _flushBuffer();
  byte[] arrayOfByte2 = this._outputBuffer;
  int i = this._outputTail;
  this._outputTail = (i + 1);
  arrayOfByte2[i] = 34;
  int j = arrayOfByte1.length;
  if (1 + (j + this._outputTail) < this._outputEnd)
  {
    System.arraycopy(arrayOfByte1, 0, this._outputBuffer, this._outputTail, j);
    this._outputTail = (j + this._outputTail);
    byte[] arrayOfByte4 = this._outputBuffer;
    int m = this._outputTail;
    this._outputTail = (m + 1);
    arrayOfByte4[m] = 34;
    return;
  }
  _writeBytes(arrayOfByte1);
  if (this._outputTail >= this._outputEnd)
    _flushBuffer();
  byte[] arrayOfByte3 = this._outputBuffer;
  int k = this._outputTail;
  this._outputTail = (k + 1);
  arrayOfByte3[k] = 34;
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
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);
  }
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
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();
  }
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
public final void flush()
  throws IOException
{
  _flushBuffer();
  if ((this._outputStream != null) && (isEnabled(JsonGenerator.Feature.FLUSH_PASSED_TO_STREAM)))
    this._outputStream.flush();
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
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));
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
public void writeNumber(float paramFloat)
  throws IOException, JsonGenerationException
{
  if ((this._cfgNumbersAsStrings) || (((Float.isNaN(paramFloat)) || (Float.isInfinite(paramFloat))) && (isEnabled(JsonGenerator.Feature.QUOTE_NON_NUMERIC_NUMBERS))))
  {
    writeString(String.valueOf(paramFloat));
    return;
  }
  _verifyValueWrite("write number");
  writeRaw(String.valueOf(paramFloat));
}
项目:12306-android-Decompile    文件:JsonGeneratorBase.java   
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);
}
项目:12306-android-Decompile    文件:JsonGeneratorBase.java   
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;
}
项目:12306-android-Decompile    文件:JsonGeneratorBase.java   
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;
}
项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
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);
}
项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
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] = '"';
}
项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
protected final void _writePPFieldName(SerializableString paramSerializableString, boolean paramBoolean)
  throws IOException, JsonGenerationException
{
  if (paramBoolean)
    this._cfgPrettyPrinter.writeObjectEntrySeparator(this);
  char[] arrayOfChar1;
  while (true)
  {
    arrayOfChar1 = paramSerializableString.asQuotedChars();
    if (!isEnabled(JsonGenerator.Feature.QUOTE_FIELD_NAMES))
      break;
    if (this._outputTail >= this._outputEnd)
      _flushBuffer();
    char[] arrayOfChar2 = this._outputBuffer;
    int i = this._outputTail;
    this._outputTail = (i + 1);
    arrayOfChar2[i] = '"';
    writeRaw(arrayOfChar1, 0, arrayOfChar1.length);
    if (this._outputTail >= this._outputEnd)
      _flushBuffer();
    char[] arrayOfChar3 = this._outputBuffer;
    int j = this._outputTail;
    this._outputTail = (j + 1);
    arrayOfChar3[j] = '"';
    return;
    this._cfgPrettyPrinter.beforeObjectEntries(this);
  }
  writeRaw(arrayOfChar1, 0, arrayOfChar1.length);
}
项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
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();
  }
}
项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
public final void flush()
  throws IOException
{
  _flushBuffer();
  if ((this._writer != null) && (isEnabled(JsonGenerator.Feature.FLUSH_PASSED_TO_STREAM)))
    this._writer.flush();
}
项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
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));
}
项目:12306-android-Decompile    文件:WriterBasedGenerator.java   
public void writeNumber(float paramFloat)
  throws IOException, JsonGenerationException
{
  if ((this._cfgNumbersAsStrings) || (((Float.isNaN(paramFloat)) || (Float.isInfinite(paramFloat))) && (isEnabled(JsonGenerator.Feature.QUOTE_NON_NUMERIC_NUMBERS))))
  {
    writeString(String.valueOf(paramFloat));
    return;
  }
  _verifyValueWrite("write number");
  writeRaw(String.valueOf(paramFloat));
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
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);
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
public Utf8Generator(IOContext paramIOContext, int paramInt1, ObjectCodec paramObjectCodec, OutputStream paramOutputStream, byte[] paramArrayOfByte, int paramInt2, boolean paramBoolean)
{
  super(paramInt1, paramObjectCodec);
  this._ioContext = paramIOContext;
  this._outputStream = paramOutputStream;
  this._bufferRecyclable = paramBoolean;
  this._outputTail = paramInt2;
  this._outputBuffer = paramArrayOfByte;
  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);
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
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);
  }
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
protected final void _writeFieldName(SerializableString paramSerializableString)
  throws IOException, JsonGenerationException
{
  byte[] arrayOfByte1 = paramSerializableString.asQuotedUTF8();
  if (!isEnabled(JsonGenerator.Feature.QUOTE_FIELD_NAMES))
  {
    _writeBytes(arrayOfByte1);
    return;
  }
  if (this._outputTail >= this._outputEnd)
    _flushBuffer();
  byte[] arrayOfByte2 = this._outputBuffer;
  int i = this._outputTail;
  this._outputTail = (i + 1);
  arrayOfByte2[i] = 34;
  int j = arrayOfByte1.length;
  if (1 + (j + this._outputTail) < this._outputEnd)
  {
    System.arraycopy(arrayOfByte1, 0, this._outputBuffer, this._outputTail, j);
    this._outputTail = (j + this._outputTail);
    byte[] arrayOfByte4 = this._outputBuffer;
    int m = this._outputTail;
    this._outputTail = (m + 1);
    arrayOfByte4[m] = 34;
    return;
  }
  _writeBytes(arrayOfByte1);
  if (this._outputTail >= this._outputEnd)
    _flushBuffer();
  byte[] arrayOfByte3 = this._outputBuffer;
  int k = this._outputTail;
  this._outputTail = (k + 1);
  arrayOfByte3[k] = 34;
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
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);
  }
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
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();
  }
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
public final void flush()
  throws IOException
{
  _flushBuffer();
  if ((this._outputStream != null) && (isEnabled(JsonGenerator.Feature.FLUSH_PASSED_TO_STREAM)))
    this._outputStream.flush();
}
项目:12306-android-Decompile    文件:Utf8Generator.java   
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));
}