Class SLCodec

  • All Implemented Interfaces:
    Serializable, Serializable

    public class SLCodec
    extends StringCodec
    The codec class for the FIPA-SLn languages. This class implements the Codec interface and allows converting back and forth between strings and frames, according to the SL grammar. By default the class implements full SL grammar, otherwise the proper value must be used in the constructor.
    Version:
    $Date$ $Revision$
    Author:
    Fabio Bellifemine - TILAB, Nicolas Lhuillier - Motorola (added support for byte[] primitive)
    See Also:
    Serialized Form
    • Constructor Detail

      • SLCodec

        public SLCodec()
        Construct a Codec object for the full SL-language (FIPA-SL).
      • SLCodec

        public SLCodec​(boolean preserveJavaTypes)
        Create an SLCodec for the full SL-language (FIPA-SL) specifying whether or not java primitive types (long, int, float, double) must be preserved. This is achieved by encoding long values as L and float values as
        Parameters:
        preserveJavaTypes - Indicates whether or not java primitive types must be preserved
      • SLCodec

        public SLCodec​(int slType)
        Construct a Codec object for the given profile of SL-language.
        Parameters:
        slType - specify 0 for FIPA-SL0, 1 for FIPA-SL1, 2 for FIPA-SL2, any other value can be used for full FIPA-SL
      • SLCodec

        public SLCodec​(int slType,
                       boolean preserveJavaTypes)
        Create an SLCodec for the given profile of SL-language specifying whether or not java primitive types (long, int, float, double) must be preserved.
        Parameters:
        slType - specify 0 for FIPA-SL0, 1 for FIPA-SL1, 2 for FIPA-SL2, any other value can be used for full FIPA-SL
        preserveJavaTypes - Indicates whether or not java primitive types must be preserved