public static final class DataStreams.ElementDelimitedOutputStream
extends java.io.OutputStream
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 and Description |
|---|
ElementDelimitedOutputStream(DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p43p2.com.google.protobuf.ByteString> consumer,
int maximumChunkSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
delimitElement() |
void |
write(byte[] b,
int offset,
int length) |
void |
write(int i) |
public ElementDelimitedOutputStream(DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p43p2.com.google.protobuf.ByteString> consumer, int maximumChunkSize)
public void delimitElement()
throws java.io.IOException
java.io.IOExceptionpublic void write(int i)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int offset,
int length)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOException