Skip to content

Instantly share code, notes, and snippets.

View TheAntimist's full-sized avatar

Ankush Mishra TheAntimist

View GitHub Profile
@TheAntimist
TheAntimist / AsyncInputStream.java
Created August 2, 2020 11:44 — forked from Stwissel/AsyncInputStream.java
Wrapping an InputStream into a ReadStream<Buffer> for vert.x
import io.vertx.core.*;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.impl.Arguments;
import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;
import io.vertx.core.streams.ReadStream;
import io.vertx.core.streams.impl.InboundBuffer;
import java.io.IOException;
import java.io.InputStream;