Class BitstreamResource

  • All Implemented Interfaces:
    org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource

    public class BitstreamResource
    extends org.springframework.core.io.AbstractResource
    This class acts as a AbstractResource used by Spring's framework to send the data in a proper and streamlined way inside the ResponseEntity body. This class' attributes are being used by Spring's framework in the overridden methods so that the proper attributes are given and used in the response.
    • Constructor Detail

      • BitstreamResource

        public BitstreamResource​(InputStream inputStream,
                                 String name,
                                 UUID uuid,
                                 long sizeBytes)
    • Method Detail

      • getDescription

        public String getDescription()
      • getFilename

        public String getFilename()
        Specified by:
        getFilename in interface org.springframework.core.io.Resource
        Overrides:
        getFilename in class org.springframework.core.io.AbstractResource
      • contentLength

        public long contentLength()
                           throws IOException
        Specified by:
        contentLength in interface org.springframework.core.io.Resource
        Overrides:
        contentLength in class org.springframework.core.io.AbstractResource
        Throws:
        IOException