Class AsyncStreamHelper
- java.lang.Object
-
- com.mongodb.async.client.gridfs.helpers.AsyncStreamHelper
-
Deprecated.Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
@Deprecated public final class AsyncStreamHelper extends java.lang.Object
A general helper class that createsAsyncInputStream
orAsyncOutputStream
instances. Provides support for:byte[]
- Converts byte arrays into Async StreamsByteBuffer
- Converts ByteBuffers into Async StreamsInputStream
- Converts InputStreams into Async Streams (Note: InputStream implementations are blocking)OutputStream
- Converts OutputStreams into Async Streams (Note: OutputStream implementations are blocking)
- Since:
- 3.3
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AsyncInputStream
toAsyncInputStream(byte[] srcBytes)
Deprecated.Converts abyte[]
into aAsyncInputStream
static AsyncInputStream
toAsyncInputStream(java.io.InputStream inputStream)
Deprecated.Converts aInputStream
into aAsyncInputStream
static AsyncInputStream
toAsyncInputStream(java.nio.ByteBuffer srcByteBuffer)
Deprecated.Converts aByteBuffer
into aAsyncInputStream
static AsyncOutputStream
toAsyncOutputStream(byte[] dstBytes)
Deprecated.Converts abyte[]
into aAsyncOutputStream
static AsyncOutputStream
toAsyncOutputStream(java.io.OutputStream outputStream)
Deprecated.Converts aOutputStream
into aAsyncOutputStream
static AsyncOutputStream
toAsyncOutputStream(java.nio.ByteBuffer dstByteBuffer)
Deprecated.Converts aByteBuffer
into aAsyncOutputStream
-
-
-
Method Detail
-
toAsyncInputStream
public static AsyncInputStream toAsyncInputStream(byte[] srcBytes)
Deprecated.Converts abyte[]
into aAsyncInputStream
- Parameters:
srcBytes
- the data source- Returns:
- the AsyncInputStream
-
toAsyncOutputStream
public static AsyncOutputStream toAsyncOutputStream(byte[] dstBytes)
Deprecated.Converts abyte[]
into aAsyncOutputStream
- Parameters:
dstBytes
- the data destination- Returns:
- the AsyncOutputStream
-
toAsyncInputStream
public static AsyncInputStream toAsyncInputStream(java.nio.ByteBuffer srcByteBuffer)
Deprecated.Converts aByteBuffer
into aAsyncInputStream
- Parameters:
srcByteBuffer
- the data source- Returns:
- the AsyncInputStream
-
toAsyncOutputStream
public static AsyncOutputStream toAsyncOutputStream(java.nio.ByteBuffer dstByteBuffer)
Deprecated.Converts aByteBuffer
into aAsyncOutputStream
- Parameters:
dstByteBuffer
- the data destination- Returns:
- the AsyncOutputStream
-
toAsyncInputStream
public static AsyncInputStream toAsyncInputStream(java.io.InputStream inputStream)
Deprecated.Converts aInputStream
into aAsyncInputStream
- Parameters:
inputStream
- the InputStream- Returns:
- the AsyncInputStream
-
toAsyncOutputStream
public static AsyncOutputStream toAsyncOutputStream(java.io.OutputStream outputStream)
Deprecated.Converts aOutputStream
into aAsyncOutputStream
- Parameters:
outputStream
- the OutputStream- Returns:
- the AsyncOutputStream
-
-