Package com.ibm.streams.operator.encoding

Encoding of tuples into alternate representations.

See: Description

  • Interface Summary 
    Interface Description
    BinaryEncoding
    Interface to encode and decode Tuples into a binary encoding.
    CharacterEncoding
    Interface to encode and decode Tuples into a character encoding.
    JSONEncoding<O extends java.util.Map,A extends java.util.List>
    Interface to encode Tuples into JSON (JavaScript Object Notation) data structures.
  • Class Summary 
    Class Description
    EncodingFactory
    Factory methods to get encoding classes for Tuple objects.

Package com.ibm.streams.operator.encoding Description

Encoding of tuples into alternate representations.

Binary Tuple Representations

SPL non-NBF native binary encoding

SPL native binary encoding of tuples is described in the SPL Binary Encoding section of the SPL Compiler Usage Reference. This format may be used to serialize tuples that may be later consumed by a C++ operator, such as writing them to a file for later processing. Since the format is native, tuples must be encoded and decoded on a platform architecture with the same byte order. For Java the byte order is defined by java.nio.ByteOrder.nativeOrder().

The byte representation of encoded tuples is compatible with the encoding provided by the C++ SPL Operator API SPL::Tuple functions serialize(NativeByteBuffer) and deserialize(NativeByteBuffer).
An instance of BinaryEncoding for SPL non-NBF native binary encoding is obtained from StreamSchema.newNativeBinaryEncoding().
The byte representation of encoded tuples is not compatible with standard Java serialization.

Java Serialization

Instances of Tuple implement java.io.Serializable. Tuples are serialized using standard Java serialization which is platform independent.
Note that a serialized tuple is is not compatible with SPL native binary encoding.

Character Tuple Representations

JSON encoding

Encoding of tuples as JSON objects is described by JSONEncoding

Since:
InfoSphere Streams 3.0
See Also:
StreamSchema.newNativeBinaryEncoding()