T - element type.public final class BeamCoder<T> extends Object implements Coder<T>
Coder from Coder.Coder.DummyCoderDUMMY_CODER| Constructor and Description |
|---|
BeamCoder(org.apache.beam.sdk.coders.Coder<T> beamCoder)
Constructor of BeamCoder.
|
| Modifier and Type | Method and Description |
|---|---|
T |
decode(InputStream inStream)
Decodes the a value from the given input stream.
|
void |
encode(T value,
OutputStream outStream)
Encodes the given value onto the specified output stream.
|
String |
toString() |
public BeamCoder(org.apache.beam.sdk.coders.Coder<T> beamCoder)
beamCoder - actual Beam coder to use.public void encode(T value, OutputStream outStream) throws IOException
Coderencode in interface Coder<T>value - the element to be encodedoutStream - the stream on which encoded bytes are writtenIOException - if fail to encodepublic T decode(InputStream inStream) throws IOException
Coderdecode in interface Coder<T>inStream - the stream from which bytes are readIOException - if fail to decodeCopyright © 2018. All rights reserved.