Interface OutputFormatter.OutputConverter<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      T fromBoolean​(boolean data)
      Converts data from Boolean to the output format.
      T fromByte​(byte data)
      Converts data from byte to the output format.
      T fromByteArray​(byte[] data)
      Converts data from a byte array to the output format.
      T fromDate​(java.util.Date data, java.lang.String format)
      Converts data from a date to the output format.
      T fromDouble​(double data)
      Converts data from double to the output format.
      T fromDoubleArray​(double[] data)
      Converts data from a double array to the output format.
      default T fromEnum​(de.iip_ecosphere.platform.transport.serialization.IipEnum data)
      Converts data from an IIP enum literal to the output format using IipEnum.getModelOrdinal().
      default T fromEnumAsName​(java.lang.Enum<?> data)
      Converts data from an IIP enum literal to the output format using Enum.name().
      T fromFloat​(float data)
      Converts data from float to the output format.
      T fromInteger​(int data)
      Converts data from int to the output format.
      T fromIntegerArray​(int[] data)
      Converts data from an integer array to the output format.
      default T fromLocalDateTime​(java.time.LocalDateTime data, java.lang.String format)
      Converts data from a date to the output format.
      T fromLong​(long data)
      Converts data from long to the output format.
      T fromObject​(java.lang.Object data)
      Converts data from an object the output format.
      T fromShort​(short data)
      Converts data from short to the output format.
      T fromString​(java.lang.String data)
      Converts data from String to the output format.
      T fromStringArray​(java.lang.String[] data)
      Converts data from a string array to the output format.
    • Method Detail

      • fromByte

        T fromByte​(byte data)
            throws java.io.IOException
        Converts data from byte to the output format.
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromInteger

        T fromInteger​(int data)
               throws java.io.IOException
        Converts data from int to the output format.
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromLong

        T fromLong​(long data)
            throws java.io.IOException
        Converts data from long to the output format.
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromString

        T fromString​(java.lang.String data)
              throws java.io.IOException
        Converts data from String to the output format.
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromShort

        T fromShort​(short data)
             throws java.io.IOException
        Converts data from short to the output format.
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromDouble

        T fromDouble​(double data)
              throws java.io.IOException
        Converts data from double to the output format.
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromFloat

        T fromFloat​(float data)
             throws java.io.IOException
        Converts data from float to the output format.
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromBoolean

        T fromBoolean​(boolean data)
               throws java.io.IOException
        Converts data from Boolean to the output format.
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromIntegerArray

        T fromIntegerArray​(int[] data)
                    throws java.io.IOException
        Converts data from an integer array to the output format.
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromDoubleArray

        T fromDoubleArray​(double[] data)
                   throws java.io.IOException
        Converts data from a double array to the output format.
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromStringArray

        T fromStringArray​(java.lang.String[] data)
                   throws java.io.IOException
        Converts data from a string array to the output format.
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromByteArray

        T fromByteArray​(byte[] data)
                 throws java.io.IOException
        Converts data from a byte array to the output format.
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromDate

        T fromDate​(java.util.Date data,
                   java.lang.String format)
            throws java.io.IOException
        Converts data from a date to the output format.
        Parameters:
        data - the date
        format - the target date format (see SimpleDateFormat)
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromLocalDateTime

        default T fromLocalDateTime​(java.time.LocalDateTime data,
                                    java.lang.String format)
                             throws java.io.IOException
        Converts data from a date to the output format.
        Parameters:
        data - the date
        format - the target date format (see SimpleDateFormat)
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromEnum

        default T fromEnum​(de.iip_ecosphere.platform.transport.serialization.IipEnum data)
                    throws java.io.IOException
        Converts data from an IIP enum literal to the output format using IipEnum.getModelOrdinal().
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromEnumAsName

        default T fromEnumAsName​(java.lang.Enum<?> data)
                          throws java.io.IOException
        Converts data from an IIP enum literal to the output format using Enum.name().
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails
      • fromObject

        T fromObject​(java.lang.Object data)
              throws java.io.IOException
        Converts data from an object the output format. [fallback dummy]
        Parameters:
        data - the data
        Returns:
        the converted output format
        Throws:
        java.io.IOException - if conversion fails