Package net.bluemind.core.rest.base
Class GenericStream<T>
java.lang.Object
net.bluemind.core.rest.base.GenericStream<T>
- All Implemented Interfaces:
io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
,io.vertx.core.streams.StreamBase
public abstract class GenericStream<T>
extends Object
implements io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CompletableFuture
<io.vertx.core.buffer.Buffer> asyncStreamToBuffer
(Stream stream) static CompletableFuture
<Void> asyncStreamToFile
(io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer> reader, File file, StandardOpenOption... opts) static CompletableFuture
<Void> asyncStreamToFile
(Stream stream, File file, StandardOpenOption... opts) endHandler
(io.vertx.core.Handler<Void> endHandler) exceptionHandler
(io.vertx.core.Handler<Throwable> exceptionHandler) fetch
(long amount) handler
(io.vertx.core.Handler<io.vertx.core.buffer.Buffer> dataHandler) protected abstract GenericStream.StreamState
<T> next()
pause()
resume()
protected abstract io.vertx.core.buffer.Buffer
static <T> Stream
simpleValue
(T value, Function<T, byte[]> toByteArray) static CompletableFuture
<Void> static byte[]
streamToBytes
(Stream stream) static void
streamToFile
(Stream stream, File file) static void
streamToFile
(Stream stream, File file, StandardOpenOption... opts) static String
streamToString
(Stream stream) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.vertx.core.streams.ReadStream
pipe, pipeTo, pipeTo
-
Constructor Details
-
GenericStream
public GenericStream()
-
-
Method Details
-
handler
- Specified by:
handler
in interfaceio.vertx.core.streams.ReadStream<T>
-
fetch
- Specified by:
fetch
in interfaceio.vertx.core.streams.ReadStream<T>
-
pause
- Specified by:
pause
in interfaceio.vertx.core.streams.ReadStream<T>
-
resume
- Specified by:
resume
in interfaceio.vertx.core.streams.ReadStream<T>
-
exceptionHandler
- Specified by:
exceptionHandler
in interfaceio.vertx.core.streams.ReadStream<T>
- Specified by:
exceptionHandler
in interfaceio.vertx.core.streams.StreamBase
-
endHandler
- Specified by:
endHandler
in interfaceio.vertx.core.streams.ReadStream<T>
-
serialize
- Throws:
Exception
-
next
- Throws:
Exception
-
streamToString
-
streamToBytes
-
asyncStreamToBuffer
-
slowRead
-
streamToFile
-
streamToFile
-
asyncStreamToFile
public static CompletableFuture<Void> asyncStreamToFile(Stream stream, File file, StandardOpenOption... opts) -
asyncStreamToFile
public static CompletableFuture<Void> asyncStreamToFile(io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer> reader, File file, StandardOpenOption... opts) -
simpleValue
-