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() |
Long |
getCount() |
@NonNull Optional<Long> |
getSize() |
@NonNull Optional<Long> |
getTotalSize() |
boolean |
hasNext() |
T |
next() |
T |
peek() |
static <T> void |
write(CountedIterator<T> iterator,
OutputStream out,
Function<T,Void> logging)
Write the entire stream to an output stream
|
void |
write(OutputStream out,
Function<T,Void> logging)
Write the entire stream to an output stream
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitof, of, of, of, peeking, peeking, spliteratorcloseQuietly, empty, of, streamforEachRemainingpublic 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 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 static <T> void write(CountedIterator<T> iterator, OutputStream out, Function<T,Void> logging) throws IOException
IOExceptionpublic @NonNull Optional<Long> getSize()
getSize in interface CountedIterator<T>public @NonNull Optional<Long> getTotalSize()
getTotalSize in interface CountedIterator<T>Copyright © 2020. All rights reserved.