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:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-