Interface MediaTypeFactory

    • Method Detail

      • fromMarshaled

        default <T> T fromMarshaled​(java.io.InputStream aContentInputStream,
                                    java.lang.Class<T> aType)
                             throws org.refcodes.exception.UnmarshalException
        Same as Unmarshalable.toUnmarshaled(Object, Class) passing an InputStream instead of a String.
        Type Parameters:
        T - the generic type
        Parameters:
        aContentInputStream - the content input stream
        aType - The type identifying the instance to be created / retrieved.
        Returns:
        the t
        Throws:
        org.refcodes.exception.UnmarshalException - the unmarshal exception
      • fromMarshaled

        default java.lang.Object fromMarshaled​(java.io.InputStream aContentInputStream,
                                               java.lang.Class<?>... aTypes)
                                        throws org.refcodes.exception.UnmarshalException
        Same as Unmarshalable.toUnmarshaled(Object, Class...) passing an InputStream instead of a String.
        Parameters:
        aContentInputStream - the content input stream
        aTypes - The types identifying or included by the instance to be created / retrieved.
        Returns:
        the object
        Throws:
        org.refcodes.exception.UnmarshalException - the unmarshal exception
      • fromMarshaled

        default java.lang.Object fromMarshaled​(java.io.InputStream aContentInputStream,
                                               java.util.Map<java.lang.String,java.lang.String> aProperties,
                                               java.lang.Class<?>... aTypes)
                                        throws org.refcodes.exception.UnmarshalException
        Same as Unmarshalable.toUnmarshaled(Object, Map, Class...) passing an InputStream instead of a String.
        Parameters:
        aContentInputStream - the content input stream
        aProperties - the properties
        aTypes - The types identifying or included by the instance to be created / retrieved.
        Returns:
        the object
        Throws:
        org.refcodes.exception.UnmarshalException - the unmarshal exception
      • fromMarshaled

        default <T> T fromMarshaled​(java.io.InputStream aContentInputStream,
                                    java.lang.Class<T> aType,
                                    java.util.Map<java.lang.String,java.lang.String> aProperties)
                             throws org.refcodes.exception.UnmarshalException
        Same as Unmarshalable.toUnmarshaled(Object, Class, Map) passing an InputStream instead of a String.
        Type Parameters:
        T - the generic type
        Parameters:
        aContentInputStream - the content input stream
        aType - The type identifying the instance to be created / retrieved.
        aProperties - the properties
        Returns:
        the type from the marshaled data
        Throws:
        org.refcodes.exception.UnmarshalException - the unmarshal exception
      • fromUnmarshaled

        default <SRC> java.io.InputStream fromUnmarshaled​(SRC aContext)
                                                   throws org.refcodes.exception.MarshalException
        Same as Marshalable.toMarshaled(Object) returning an InputStream instead of a String.
        Type Parameters:
        SRC - the generic type
        Parameters:
        aContext - the context
        Returns:
        the input stream
        Throws:
        org.refcodes.exception.MarshalException - the marshal exception
      • fromUnmarshaled

        default <SRC> java.io.InputStream fromUnmarshaled​(SRC aContext,
                                                          java.util.Map<java.lang.String,java.lang.String> aProperties)
                                                   throws org.refcodes.exception.MarshalException
        Same as Marshalable.toMarshaled(Object, Map) returning an InputStream instead of a String.
        Type Parameters:
        SRC - the generic type
        Parameters:
        aContext - the context
        aProperties - the properties
        Returns:
        the input stream
        Throws:
        org.refcodes.exception.MarshalException - the marshal exception