gson/src/org/immutables/gson/stream/JsonParserReader.java
public final TokenBuffer nextTokenBuffer() throws IOException {
    TokenBuffer buffer = new TokenBuffer(parser);
    // if token is consumed, but undelying parser is still sitting on this token, we move forward
    requirePeek();
    buffer.copyCurrentStructure(parser);
    // when we will return to reading from reader, state will be cleared and nextToken after
    clearPeek();
    return buffer;
  }
public final TokenBuffer nextTokenBuffer() throws IOException {
    TokenBuffer buffer = new TokenBuffer(parser);
    // if token is consumed, but undelying parser is still sitting on this token, we move forward
    requirePeek();
    buffer.copyCurrentStructure(parser);
    // when we will return to reading from reader, state will be cleared and nextToken after
    clearPeek();
    return buffer;
  }
public final TokenBuffer nextTokenBuffer ( ) throws IOException { TokenBuffer buffer = new TokenBuffer ( parser ) ; // if token is consumed, but undelying parser is still sitting on this token, we move forward requirePeek ( ) ; buffer . copyCurrentStructure ( parser ) ; // when we will return to reading from reader, state will be cleared and nextToken after clearPeek ( ) ; return buffer ; }
Reads current value including objects and array as effiecient token buffer.
Use of Jackson's own mechanisms is important to preserve custom elements
such as special embedded objects in BSON or other data formats.
@return {@link TokenBuffer}
@throws IOException if error occured
Reads current value including objects and array as effiecient token buffer . Use of Jackson s own mechanisms is important to preserve custom elements such as special embedded objects in BSON or other data formats .