Class BitstreamResource

java.lang.Object
org.springframework.core.io.AbstractResource
org.dspace.app.rest.utils.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 Details

    • BitstreamResource

      public BitstreamResource(String name, UUID uuid, UUID currentUserUUID, Set<UUID> currentSpecialGroups, boolean shouldGenerateCoverPage)
  • Method Details

    • getDescription

      public String getDescription()
    • getInputStream

      public InputStream getInputStream() throws IOException
      Throws:
      IOException
    • 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()
      Specified by:
      contentLength in interface org.springframework.core.io.Resource
      Overrides:
      contentLength in class org.springframework.core.io.AbstractResource
    • getChecksum

      public String getChecksum()