protected final JsonToken _handleFieldName() throws IOException, JsonParseException {
  if (_inputPtr >= _inputEnd) {
    loadMoreGuaranteed();
  }
  int ch=_inputBuffer[_inputPtr++];
  _typeByte=ch;
switch ((ch >> 6) & 3) {
case 0:
switch (ch) {
case 0x20:
      _parsingContext.setCurrentName("");
    return JsonToken.FIELD_NAME;
case 0x30:
case 0x31:
case 0x32:
case 0x33:
{
    if (_inputPtr >= _inputEnd) {
      loadMoreGuaranteed();
    }
    int index=((ch & 0x3) << 8) + (_inputBuffer[_inputPtr++] & 0xFF);
    if (index >= _seenNameCount) {
      _reportInvalidSharedName(index);
    }
    _parsingContext.setCurrentName(_seenNames[index]);
  }
return JsonToken.FIELD_NAME;
case 0x34:
_handleLongFieldName();
return JsonToken.FIELD_NAME;
}
break;
case 1:
{
int index=(ch & 0x3F);
if (index >= _seenNameCount) {
_reportInvalidSharedName(index);
}
_parsingContext.setCurrentName(_seenNames[index]);
}
return JsonToken.FIELD_NAME;
case 2:
{
int len=1 + (ch & 0x3f);
String name;
Name n=_findDecodedFromSymbols(len);
if (n != null) {
name=n.getName();
_inputPtr+=len;
}
 else {
name=_decodeShortAsciiName(len);
name=_addDecodedToSymbols(len,name);
}
if (_seenNames != null) {
if (_seenNameCount >= _seenNames.length) {
_seenNames=_expandSeenNames(_seenNames);
}
_seenNames[_seenNameCount++]=name;
}
_parsingContext.setCurrentName(name);
}
return JsonToken.FIELD_NAME;
case 3:
ch&=0x3F;
{
if (ch > 0x37) {
if (ch == 0x3B) {
if (!_parsingContext.inObject()) {
_reportMismatchedEndMarker('}',']');
}
_parsingContext=_parsingContext.getParent();
return JsonToken.END_OBJECT;
}
}
 else {
final int len=ch + 2;
String name;
Name n=_findDecodedFromSymbols(len);
if (n != null) {
name=n.getName();
_inputPtr+=len;
}
 else {
name=_decodeShortUnicodeName(len);
name=_addDecodedToSymbols(len,name);
}
if (_seenNames != null) {
if (_seenNameCount >= _seenNames.length) {
_seenNames=_expandSeenNames(_seenNames);
}
_seenNames[_seenNameCount++]=name;
}
_parsingContext.setCurrentName(name);
return JsonToken.FIELD_NAME;
}
}
break;
}
_reportError("Invalid type marker byte 0x" + Integer.toHexString(_typeByte) + " for expected field name (or END_OBJECT marker)");
return null;
}

protected final JsonToken _handleFieldName ( ) throws IOException , JsonParseException { if ( _inputPtr >= _inputEnd ) { loadMoreGuaranteed ( ) ; } int ch = _inputBuffer [ _inputPtr ++ ] ; _typeByte = ch ; switch ( ( ch > > 6 ) & 3 ) { case 0 : switch ( ch ) { case 0x20 : _parsingContext . setCurrentName ( "" ) ; return JsonToken . FIELD_NAME ; case 0x30 : case 0x31 : case 0x32 : case 0x33 : { if ( _inputPtr >= _inputEnd ) { loadMoreGuaranteed ( ) ; } int index = ( ( ch & 0x3 ) << 8 ) + ( _inputBuffer [ _inputPtr ++ ] & 0xFF ) ; if ( index >= _seenNameCount ) { _reportInvalidSharedName ( index ) ; } _parsingContext . setCurrentName ( _seenNames [ index ] ) ; } return JsonToken . FIELD_NAME ; case 0x34 : _handleLongFieldName ( ) ; return JsonToken . FIELD_NAME ; } break ; case 1 : { int index = ( ch & 0x3F ) ; if ( index >= _seenNameCount ) { _reportInvalidSharedName ( index ) ; } _parsingContext . setCurrentName ( _seenNames [ index ] ) ; } return JsonToken . FIELD_NAME ; case 2 : { int len = 1 + ( ch & 0x3f ) ; String name ; Name n = _findDecodedFromSymbols ( len ) ; if ( n != null ) { name = n . getName ( ) ; _inputPtr += len ; } else { name = _decodeShortAsciiName ( len ) ; name = _addDecodedToSymbols ( len , name ) ; } if ( _seenNames != null ) { if ( _seenNameCount >= _seenNames . length ) { _seenNames = _expandSeenNames ( _seenNames ) ; } _seenNames [ _seenNameCount ++ ] = name ; } _parsingContext . setCurrentName ( name ) ; } return JsonToken . FIELD_NAME ; case 3 : ch &= 0x3F ; { if ( ch > 0x37 ) { if ( ch == 0x3B ) { if ( ! _parsingContext . inObject ( ) ) { _reportMismatchedEndMarker ( '}' , ']' ) ; } _parsingContext = _parsingContext . getParent ( ) ; return JsonToken . END_OBJECT ; } } else { final int len = ch + 2 ; String name ; Name n = _findDecodedFromSymbols ( len ) ; if ( n != null ) { name = n . getName ( ) ; _inputPtr += len ; } else { name = _decodeShortUnicodeName ( len ) ; name = _addDecodedToSymbols ( len , name ) ; } if ( _seenNames != null ) { if ( _seenNameCount >= _seenNames . length ) { _seenNames = _expandSeenNames ( _seenNames ) ; } _seenNames [ _seenNameCount ++ ] = name ; } _parsingContext . setCurrentName ( name ) ; return JsonToken . FIELD_NAME ; } } break ; } _reportError ( "Invalid type marker byte 0x" + Integer . toHexString ( _typeByte ) + " for expected field name (or END_OBJECT marker)" ) ; return null ; }
method that handles initial token type recognition for token that has to be either field_name or end_object .
