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.ObjectA general helper class that createsAsyncInputStreamorAsyncOutputStreaminstances. 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 AsyncInputStreamtoAsyncInputStream(byte[] srcBytes)Deprecated.Converts abyte[]into aAsyncInputStreamstatic AsyncInputStreamtoAsyncInputStream(java.io.InputStream inputStream)Deprecated.Converts aInputStreaminto aAsyncInputStreamstatic AsyncInputStreamtoAsyncInputStream(java.nio.ByteBuffer srcByteBuffer)Deprecated.Converts aByteBufferinto aAsyncInputStreamstatic AsyncOutputStreamtoAsyncOutputStream(byte[] dstBytes)Deprecated.Converts abyte[]into aAsyncOutputStreamstatic AsyncOutputStreamtoAsyncOutputStream(java.io.OutputStream outputStream)Deprecated.Converts aOutputStreaminto aAsyncOutputStreamstatic AsyncOutputStreamtoAsyncOutputStream(java.nio.ByteBuffer dstByteBuffer)Deprecated.Converts aByteBufferinto 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 aByteBufferinto aAsyncInputStream- Parameters:
srcByteBuffer- the data source- Returns:
- the AsyncInputStream
-
toAsyncOutputStream
public static AsyncOutputStream toAsyncOutputStream(java.nio.ByteBuffer dstByteBuffer)
Deprecated.Converts aByteBufferinto aAsyncOutputStream- Parameters:
dstByteBuffer- the data destination- Returns:
- the AsyncOutputStream
-
toAsyncInputStream
public static AsyncInputStream toAsyncInputStream(java.io.InputStream inputStream)
Deprecated.Converts aInputStreaminto aAsyncInputStream- Parameters:
inputStream- the InputStream- Returns:
- the AsyncInputStream
-
toAsyncOutputStream
public static AsyncOutputStream toAsyncOutputStream(java.io.OutputStream outputStream)
Deprecated.Converts aOutputStreaminto aAsyncOutputStream- Parameters:
outputStream- the OutputStream- Returns:
- the AsyncOutputStream
-
-