public class DataStreams
extends java.lang.Object
DataStreams.DataStreamDecoder treats multiple ByteStrings as a single input stream decoding
 values with the supplied iterator. outbound(OutputChunkConsumer) treats a single OutputStream as multiple ByteStrings.| Modifier and Type | Class and Description | 
|---|---|
| static class  | DataStreams.DataStreamDecoder<T>An adapter which converts an  InputStreamto aPrefetchableIteratorofTvalues using the specifiedCoder. | 
| static class  | DataStreams.ElementDelimitedOutputStreamAn adapter which wraps an  DataStreams.OutputChunkConsumeras anOutputStream. | 
| static interface  | DataStreams.OutputChunkConsumer<T>A callback which is invoked whenever the  outbound(org.apache.beam.sdk.fn.stream.DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p60p1.com.google.protobuf.ByteString>)OutputStreambecomes full. | 
| Modifier and Type | Field and Description | 
|---|---|
| static int | DEFAULT_OUTBOUND_BUFFER_LIMIT_BYTES | 
| Constructor and Description | 
|---|
| DataStreams() | 
| Modifier and Type | Method and Description | 
|---|---|
| static DataStreams.ElementDelimitedOutputStream | outbound(DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p60p1.com.google.protobuf.ByteString> consumer)Converts a single element delimited  OutputStreaminto multipleByteStrings. | 
| static DataStreams.ElementDelimitedOutputStream | outbound(DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p60p1.com.google.protobuf.ByteString> consumer,
        int maximumChunkSize)Converts a single element delimited  OutputStreaminto multipleByteStringsusing the specified maximum chunk size. | 
public static final int DEFAULT_OUTBOUND_BUFFER_LIMIT_BYTES
public static DataStreams.ElementDelimitedOutputStream outbound(DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p60p1.com.google.protobuf.ByteString> consumer)
OutputStream into multiple ByteStrings.
 Note that users must call DataStreams.ElementDelimitedOutputStream.delimitElement() after each
 element.
 
Note that this OutputStream follows the Beam Fn API specification for forcing values
 that encode producing zero bytes to produce exactly one byte.
public static DataStreams.ElementDelimitedOutputStream outbound(DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p60p1.com.google.protobuf.ByteString> consumer, int maximumChunkSize)
OutputStream into multiple ByteStrings using the specified maximum chunk size.
 Note that users must call DataStreams.ElementDelimitedOutputStream.delimitElement() after each
 element.
 
Note that this OutputStream follows the Beam Fn API specification for forcing values
 that encode producing zero bytes to produce exactly one byte.