@@ -200,7 +200,7 @@ public void writeFieldName(String name) throws IOException
200
200
_writePPFieldName (name );
201
201
return ;
202
202
}
203
- final int status = _outputContext .writeFieldName (name );
203
+ final int status = _tokenWriteContext .writeFieldName (name );
204
204
if (status == JsonWriteContext .STATUS_EXPECT_VALUE ) {
205
205
_reportError ("Can not write a field name, expecting a value" );
206
206
}
@@ -250,7 +250,7 @@ public void writeFieldName(SerializableString name) throws IOException
250
250
_writePPFieldName (name );
251
251
return ;
252
252
}
253
- final int status = _outputContext .writeFieldName (name .getValue ());
253
+ final int status = _tokenWriteContext .writeFieldName (name .getValue ());
254
254
if (status == JsonWriteContext .STATUS_EXPECT_VALUE ) {
255
255
_reportError ("Can not write a field name, expecting a value" );
256
256
}
@@ -299,7 +299,7 @@ private final void _writeUnq(SerializableString name) throws IOException {
299
299
public final void writeStartArray () throws IOException
300
300
{
301
301
_verifyValueWrite ("start an array" );
302
- _outputContext = _outputContext .createChildArrayContext ();
302
+ _tokenWriteContext = _tokenWriteContext .createChildArrayContext ();
303
303
if (_cfgPrettyPrinter != null ) {
304
304
_cfgPrettyPrinter .writeStartArray (this );
305
305
} else {
@@ -314,7 +314,7 @@ public final void writeStartArray() throws IOException
314
314
public final void writeStartArray (int len ) throws IOException
315
315
{
316
316
_verifyValueWrite ("start an array" );
317
- _outputContext = _outputContext .createChildArrayContext ();
317
+ _tokenWriteContext = _tokenWriteContext .createChildArrayContext ();
318
318
if (_cfgPrettyPrinter != null ) {
319
319
_cfgPrettyPrinter .writeStartArray (this );
320
320
} else {
@@ -329,7 +329,7 @@ public final void writeStartArray(int len) throws IOException
329
329
public final void writeStartArray (Object forValue , int len ) throws IOException
330
330
{
331
331
_verifyValueWrite ("start an array" );
332
- _outputContext = _outputContext .createChildArrayContext (forValue );
332
+ _tokenWriteContext = _tokenWriteContext .createChildArrayContext (forValue );
333
333
if (_cfgPrettyPrinter != null ) {
334
334
_cfgPrettyPrinter .writeStartArray (this );
335
335
} else {
@@ -343,25 +343,25 @@ public final void writeStartArray(Object forValue, int len) throws IOException
343
343
@ Override
344
344
public final void writeEndArray () throws IOException
345
345
{
346
- if (!_outputContext .inArray ()) {
347
- _reportError ("Current context not Array but " +_outputContext .typeDesc ());
346
+ if (!_tokenWriteContext .inArray ()) {
347
+ _reportError ("Current context not Array but " +_tokenWriteContext .typeDesc ());
348
348
}
349
349
if (_cfgPrettyPrinter != null ) {
350
- _cfgPrettyPrinter .writeEndArray (this , _outputContext .getEntryCount ());
350
+ _cfgPrettyPrinter .writeEndArray (this , _tokenWriteContext .getEntryCount ());
351
351
} else {
352
352
if (_outputTail >= _outputEnd ) {
353
353
_flushBuffer ();
354
354
}
355
355
_outputBuffer [_outputTail ++] = BYTE_RBRACKET ;
356
356
}
357
- _outputContext = _outputContext .clearAndGetParent ();
357
+ _tokenWriteContext = _tokenWriteContext .clearAndGetParent ();
358
358
}
359
359
360
360
@ Override
361
361
public final void writeStartObject () throws IOException
362
362
{
363
363
_verifyValueWrite ("start an object" );
364
- _outputContext = _outputContext .createChildObjectContext ();
364
+ _tokenWriteContext = _tokenWriteContext .createChildObjectContext ();
365
365
if (_cfgPrettyPrinter != null ) {
366
366
_cfgPrettyPrinter .writeStartObject (this );
367
367
} else {
@@ -376,8 +376,8 @@ public final void writeStartObject() throws IOException
376
376
public void writeStartObject (Object forValue ) throws IOException
377
377
{
378
378
_verifyValueWrite ("start an object" );
379
- JsonWriteContext ctxt = _outputContext .createChildObjectContext (forValue );
380
- _outputContext = ctxt ;
379
+ JsonWriteContext ctxt = _tokenWriteContext .createChildObjectContext (forValue );
380
+ _tokenWriteContext = ctxt ;
381
381
if (_cfgPrettyPrinter != null ) {
382
382
_cfgPrettyPrinter .writeStartObject (this );
383
383
} else {
@@ -391,18 +391,18 @@ public void writeStartObject(Object forValue) throws IOException
391
391
@ Override
392
392
public final void writeEndObject () throws IOException
393
393
{
394
- if (!_outputContext .inObject ()) {
395
- _reportError ("Current context not Object but " +_outputContext .typeDesc ());
394
+ if (!_tokenWriteContext .inObject ()) {
395
+ _reportError ("Current context not Object but " +_tokenWriteContext .typeDesc ());
396
396
}
397
397
if (_cfgPrettyPrinter != null ) {
398
- _cfgPrettyPrinter .writeEndObject (this , _outputContext .getEntryCount ());
398
+ _cfgPrettyPrinter .writeEndObject (this , _tokenWriteContext .getEntryCount ());
399
399
} else {
400
400
if (_outputTail >= _outputEnd ) {
401
401
_flushBuffer ();
402
402
}
403
403
_outputBuffer [_outputTail ++] = BYTE_RCURLY ;
404
404
}
405
- _outputContext = _outputContext .clearAndGetParent ();
405
+ _tokenWriteContext = _tokenWriteContext .clearAndGetParent ();
406
406
}
407
407
408
408
/**
@@ -411,7 +411,7 @@ public final void writeEndObject() throws IOException
411
411
*/
412
412
protected final void _writePPFieldName (String name ) throws IOException
413
413
{
414
- int status = _outputContext .writeFieldName (name );
414
+ int status = _tokenWriteContext .writeFieldName (name );
415
415
if (status == JsonWriteContext .STATUS_EXPECT_VALUE ) {
416
416
_reportError ("Can not write a field name, expecting a value" );
417
417
}
@@ -451,7 +451,7 @@ protected final void _writePPFieldName(String name) throws IOException
451
451
452
452
protected final void _writePPFieldName (SerializableString name ) throws IOException
453
453
{
454
- final int status = _outputContext .writeFieldName (name .getValue ());
454
+ final int status = _tokenWriteContext .writeFieldName (name .getValue ());
455
455
if (status == JsonWriteContext .STATUS_EXPECT_VALUE ) {
456
456
_reportError ("Can not write a field name, expecting a value" );
457
457
}
@@ -1101,7 +1101,7 @@ public void writeNull() throws IOException
1101
1101
@ Override
1102
1102
protected final void _verifyValueWrite (String typeMsg ) throws IOException
1103
1103
{
1104
- final int status = _outputContext .writeValue ();
1104
+ final int status = _tokenWriteContext .writeValue ();
1105
1105
if (_cfgPrettyPrinter != null ) {
1106
1106
// Otherwise, pretty printer knows what to do...
1107
1107
_verifyPrettyValueWrite (typeMsg , status );
0 commit comments