Package io.micronaut.jackson.core.tree
Class JsonStreamTransfer
java.lang.Object
io.micronaut.jackson.core.tree.JsonStreamTransfer
Utility functions for transferring from a
JsonParser
to a JsonGenerator
.- Since:
- 3.1
- Author:
- Jonas Konrad
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
transfer
(com.fasterxml.jackson.core.JsonParser from, com.fasterxml.jackson.core.JsonGenerator to, JsonStreamConfig config) Transfer tokens, starting with the current token.static void
transferCurrentToken
(com.fasterxml.jackson.core.JsonParser from, com.fasterxml.jackson.core.JsonGenerator to, JsonStreamConfig config) Transfer a single token.static void
transferNext
(com.fasterxml.jackson.core.JsonParser from, com.fasterxml.jackson.core.JsonGenerator to, JsonStreamConfig config) Transfer tokens, starting with the next token.
-
Method Details
-
transferNext
public static void transferNext(com.fasterxml.jackson.core.JsonParser from, com.fasterxml.jackson.core.JsonGenerator to, JsonStreamConfig config) throws IOException Transfer tokens, starting with the next token.- Parameters:
from
- Parser to transfer data from.to
- Generator to transfer data to.config
- Configuration to use for copying.- Throws:
IOException
- IOException
-
transfer
public static void transfer(com.fasterxml.jackson.core.JsonParser from, com.fasterxml.jackson.core.JsonGenerator to, JsonStreamConfig config) throws IOException Transfer tokens, starting with the current token.- Parameters:
from
- Parser to transfer data from.to
- Generator to transfer data to.config
- Configuration to use for copying.- Throws:
IOException
- IOException
-
transferCurrentToken
public static void transferCurrentToken(com.fasterxml.jackson.core.JsonParser from, com.fasterxml.jackson.core.JsonGenerator to, JsonStreamConfig config) throws IOException Transfer a single token.- Parameters:
from
- Parser to transfer data from.to
- Generator to transfer data to.config
- Configuration to use for copying.- Throws:
IOException
- IOException
-