public static class JsonArrayIterator.Builder<T> extends Object
| Modifier and Type | Method and Description |
|---|---|
JsonArrayIterator<T> |
build() |
JsonArrayIterator.Builder<T> |
callback(@Nullable Runnable callback) |
JsonArrayIterator.Builder<T> |
inputStream(@NonNull InputStream inputStream) |
JsonArrayIterator.Builder<T> |
logger(@Nullable org.slf4j.Logger logger) |
JsonArrayIterator.Builder<T> |
objectMapper(@Nullable com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
JsonArrayIterator.Builder<T> |
sizeField(@Nullable String sizeField) |
JsonArrayIterator.Builder<T> |
skipNulls(@Nullable Boolean skipNulls) |
String |
toString() |
JsonArrayIterator.Builder<T> |
totalSizeField(@Nullable String totalSizeField) |
JsonArrayIterator.Builder<T> |
valueClass(@Nullable Class<T> valueClass) |
JsonArrayIterator.Builder<T> |
valueCreator(@Nullable BiFunction<com.fasterxml.jackson.core.JsonParser,com.fasterxml.jackson.core.TreeNode,T> valueCreator) |
public JsonArrayIterator.Builder<T> inputStream(@NonNull InputStream inputStream)
inputStream - The inputstream containing the jsonthis.public JsonArrayIterator.Builder<T> valueCreator(@Nullable BiFunction<com.fasterxml.jackson.core.JsonParser,com.fasterxml.jackson.core.TreeNode,T> valueCreator)
valueCreator - A function which converts a json TreeNode to the desired objects in the iterator.this.public JsonArrayIterator.Builder<T> valueClass(@Nullable Class<T> valueClass)
valueClass - If valueCreator is not given, simply the class of the desired object can be given
Json unmarshalling with the given objectMapper will happen.this.public JsonArrayIterator.Builder<T> callback(@Nullable Runnable callback)
callback - If the iterator is ready, closed or error this callback will be called.this.public JsonArrayIterator.Builder<T> sizeField(@Nullable String sizeField)
sizeField - The size of the iterator, i.e. the size of the array represented in the json streamthis.public JsonArrayIterator.Builder<T> totalSizeField(@Nullable String totalSizeField)
totalSizeField - Sometimes the array is part of something bigger, e.g. a page in a search result. The size
of the 'complete' result can be in the beginning of the json in this field.this.public JsonArrayIterator.Builder<T> objectMapper(@Nullable com.fasterxml.jackson.databind.ObjectMapper objectMapper)
objectMapper - Default the objectMapper Jackson2Mapper.getLenientInstance() will be used (in
conjuction with valueClass, but you may specify another onethis.public JsonArrayIterator.Builder<T> logger(@Nullable org.slf4j.Logger logger)
logger - Default this is logging to nl.vpro.jackson2.JsonArrayIterator, but you may override that.this.public JsonArrayIterator.Builder<T> skipNulls(@Nullable Boolean skipNulls)
this.public JsonArrayIterator<T> build() throws IOException
IOExceptionCopyright © 2022. All rights reserved.