Class DefaultTranscoder

  • All Implemented Interfaces:
    Transcoder

    public final class DefaultTranscoder
    extends java.lang.Object
    implements Transcoder
    Handle conversions between text/plain, url-encoded, java objects, and octet-stream contents.
    Since:
    9.2
    • Constructor Detail

      • DefaultTranscoder

        public DefaultTranscoder​(Marshaller marshaller)
    • Method Detail

      • transcode

        public java.lang.Object transcode​(java.lang.Object content,
                                          MediaType contentType,
                                          MediaType destinationType)
        Description copied from interface: Transcoder
        Transcodes content between two different MediaType.
        Specified by:
        transcode in interface Transcoder
        Parameters:
        content - Content to transcode.
        contentType - The MediaType of the content.
        destinationType - The target MediaType to convert.
        Returns:
        the transcoded content.
      • convertToOctetStream

        public java.lang.Object convertToOctetStream​(java.lang.Object content,
                                                     MediaType contentType,
                                                     MediaType destinationType)
                                              throws java.io.IOException,
                                                     java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.lang.InterruptedException