Package org.apache.beam.sdk.fn.stream
Class DataStreams.ElementDelimitedOutputStream
java.lang.Object
java.io.OutputStream
org.apache.beam.sdk.fn.stream.DataStreams.ElementDelimitedOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Enclosing class:
DataStreams
An adapter which wraps an
DataStreams.OutputChunkConsumer as an OutputStream.
Note that this adapter follows the Beam Fn API specification for forcing values that encode producing zero bytes to produce exactly one byte.
Note that users must invoke delimitElement() at each element boundary.
-
Constructor Summary
ConstructorsConstructorDescriptionElementDelimitedOutputStream(DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p69p0.com.google.protobuf.ByteString> consumer, int maximumChunkSize) -
Method Summary
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
Constructor Details
-
ElementDelimitedOutputStream
public ElementDelimitedOutputStream(DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p69p0.com.google.protobuf.ByteString> consumer, int maximumChunkSize)
-
-
Method Details
-
delimitElement
- Throws:
IOException
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-