public abstract class GenericStream<T>
extends java.lang.Object
implements io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
Modifier and Type | Class and Description |
---|---|
static class |
GenericStream.AccumulatorStream |
static class |
GenericStream.State |
static class |
GenericStream.StreamState<T> |
Constructor and Description |
---|
GenericStream() |
Modifier and Type | Method and Description |
---|---|
static <T> java.util.concurrent.CompletableFuture<io.vertx.core.buffer.Buffer> |
asyncStreamToBuffer(Stream stream) |
GenericStream<T> |
endHandler(io.vertx.core.Handler<java.lang.Void> endHandler) |
GenericStream<T> |
exceptionHandler(io.vertx.core.Handler<java.lang.Throwable> exceptionHandler) |
GenericStream<T> |
fetch(long amount) |
GenericStream<T> |
handler(io.vertx.core.Handler<io.vertx.core.buffer.Buffer> dataHandler) |
protected abstract GenericStream.StreamState<T> |
next() |
GenericStream<T> |
pause() |
GenericStream<T> |
resume() |
protected abstract io.vertx.core.buffer.Buffer |
serialize(T n) |
static <T> Stream |
simpleValue(T value,
java.util.function.Function<T,byte[]> toByteArray) |
static java.util.concurrent.CompletableFuture<java.lang.Void> |
slowRead(Stream stream) |
static <T> void |
streamToFile(Stream stream,
java.io.File file) |
static <T> void |
streamToFile(Stream stream,
java.io.File file,
java.nio.file.StandardOpenOption... opts) |
static java.lang.String |
streamToString(Stream stream) |
public GenericStream<T> handler(io.vertx.core.Handler<io.vertx.core.buffer.Buffer> dataHandler)
handler
in interface io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
public GenericStream<T> fetch(long amount)
fetch
in interface io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
public GenericStream<T> pause()
pause
in interface io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
public GenericStream<T> resume()
resume
in interface io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
public GenericStream<T> exceptionHandler(io.vertx.core.Handler<java.lang.Throwable> exceptionHandler)
exceptionHandler
in interface io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
exceptionHandler
in interface io.vertx.core.streams.StreamBase
public GenericStream<T> endHandler(io.vertx.core.Handler<java.lang.Void> endHandler)
endHandler
in interface io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
protected abstract io.vertx.core.buffer.Buffer serialize(T n) throws java.lang.Exception
java.lang.Exception
protected abstract GenericStream.StreamState<T> next() throws java.lang.Exception
java.lang.Exception
public static java.lang.String streamToString(Stream stream)
public static <T> java.util.concurrent.CompletableFuture<io.vertx.core.buffer.Buffer> asyncStreamToBuffer(Stream stream)
public static java.util.concurrent.CompletableFuture<java.lang.Void> slowRead(Stream stream)
public static <T> void streamToFile(Stream stream, java.io.File file)
public static <T> void streamToFile(Stream stream, java.io.File file, java.nio.file.StandardOpenOption... opts)
public static <T> Stream simpleValue(T value, java.util.function.Function<T,byte[]> toByteArray)
Copyright © 2021. All Rights Reserved.