Class StringDeserializer

    • Field Detail

    • Constructor Detail

      • StringDeserializer

        public StringDeserializer()
    • Method Detail

      • configure

        public void configure​(Map<String,​?> properties)
        Configures this StringDeserializer with the given properties.

        NOTE: The default encoding is UTF-8.

        Specified by:
        configure in interface Deserializer<String>
        Parameters:
        properties - a map of configuration properties
        Throws:
        IllegalArgumentException - if the charset encoding type is unsupported or the specified charset is unsupported, or when properties is null.
      • deserialize

        public String deserialize​(String destinationName,
                                  byte[] payload)
        Deserializes the given byte[] to string using the configured character encoding.

        NOTE: The default encoding is UTF-8.

        Specified by:
        deserialize in interface Deserializer<String>
        Parameters:
        destinationName - the name of the destination (not used in this implementation)
        payload - the byte[] to deserialize
        Returns:
        the deserialized String, or null if the input payload is null