org.springframework.core.codec

Class ByteBufferDecoder

  • All Implemented Interfaces:
    Decoder<java.nio.ByteBuffer>


    public class ByteBufferDecoder
    extends AbstractDataBufferDecoder<java.nio.ByteBuffer>
    Decoder for ByteBuffers.
    Since:
    5.0
    Author:
    Sebastien Deleuze, Arjen Poutsma, Rossen Stoyanchev
    • Constructor Detail

      • ByteBufferDecoder

        public ByteBufferDecoder()
    • Method Detail

      • canDecode

        public boolean canDecode(ResolvableType elementType,
                                 @Nullable
                                 MimeType mimeType)
        Description copied from interface: Decoder
        Whether the decoder supports the given target element type and the MIME type of the source stream.
        Specified by:
        canDecode in interface Decoder<java.nio.ByteBuffer>
        Overrides:
        canDecode in class AbstractDecoder<java.nio.ByteBuffer>
        Parameters:
        elementType - the target element type for the output stream
        mimeType - the mime type associated with the stream to decode (can be null if not specified)
        Returns:
        true if supported, false otherwise