public interface FlowFileCodec extends VersionedRemoteResource
Provides a mechanism for encoding and decoding FlowFiles as streams so that they can be transferred remotely.
| Modifier and Type | Method and Description |
|---|---|
DataPacket |
decode(InputStream stream)
Decodes the contents of the InputStream, interpreting the data to
determine the next DataPacket's attributes and content.
|
void |
encode(DataPacket dataPacket,
OutputStream outStream)
Encodes a DataPacket and its content as a single stream of data and
writes that stream to the output.
|
List<Integer> |
getSupportedVersions()
Returns a List of all versions that this codec is able to support, in the
order that they are preferred by the codec
|
getResourceName, getVersionNegotiatorList<Integer> getSupportedVersions()
void encode(DataPacket dataPacket, OutputStream outStream) throws IOException, TransmissionDisabledException
dataPacket - the data to serializeoutStream - the stream to write the data toIOException - if there is a communications issueTransmissionDisabledException - if a user terminates the connectionDataPacket decode(InputStream stream) throws IOException, ProtocolException, TransmissionDisabledException
stream - an InputStream containing DataPacket's content and
attributesnull if the
stream was out of dataIOException - if unable to read streamProtocolException - if the input is malformedTransmissionDisabledException - if a user terminates the connectionCopyright © 2023 Apache NiFi Project. All rights reserved.