public class JsonArrayIterator<T> extends com.google.common.collect.UnmodifiableIterator<T> implements CloseableIterator<T>, com.google.common.collect.PeekingIterator<T>, CountedIterator<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
JsonArrayIterator.Builder<T> |
static class |
JsonArrayIterator.ValueReadException |
| Constructor and Description |
|---|
JsonArrayIterator(InputStream inputStream,
BiFunction<com.fasterxml.jackson.core.JsonParser,com.fasterxml.jackson.core.TreeNode,T> valueCreator) |
JsonArrayIterator(InputStream inputStream,
Class<T> clazz) |
JsonArrayIterator(InputStream inputStream,
Class<T> clazz,
Runnable callback) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
callback() |
void |
close() |
void |
finalize() |
protected void |
findNext() |
Runnable |
getCallback() |
Long |
getCount() |
Optional<Long> |
getSize() |
Optional<Long> |
getTotalSize() |
boolean |
hasNext() |
T |
next() |
T |
peek() |
void |
setCallback(Runnable callback) |
void |
setLogger(org.slf4j.Logger log) |
void |
write(OutputStream out,
Function<T,Void> logging) |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitof, of, of, of, peeking, peeking, spliteratorcloseQuietlyforEachRemainingpublic JsonArrayIterator(InputStream inputStream, Class<T> clazz) throws IOException
IOExceptionpublic JsonArrayIterator(InputStream inputStream, Class<T> clazz, Runnable callback) throws IOException
IOExceptionpublic JsonArrayIterator(InputStream inputStream, BiFunction<com.fasterxml.jackson.core.JsonParser,com.fasterxml.jackson.core.TreeNode,T> valueCreator) throws IOException
IOExceptionpublic void setLogger(org.slf4j.Logger log)
public void setCallback(Runnable callback)
public Runnable getCallback()
public T next()
public Long getCount()
getCount in interface CountedIterator<T>protected void findNext()
public void close()
throws IOException
close in interface AutoCloseableclose in interface CountedIterator<T>IOExceptionprotected void callback()
public void write(OutputStream out, Function<T,Void> logging) throws IOException
IOExceptionpublic Optional<Long> getSize()
getSize in interface CountedIterator<T>public Optional<Long> getTotalSize()
getTotalSize in interface CountedIterator<T>Copyright © 2019. All rights reserved.