Package org.dspace.app.rest.utils
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongMethods inherited from class org.springframework.core.io.AbstractResource
createRelative, equals, exists, getFile, getFileForLastModifiedCheck, getURI, getURL, hashCode, isFile, isOpen, isReadable, lastModified, readableChannel, toString
-
Constructor Details
-
BitstreamResource
-
-
Method Details
-
getDescription
-
getInputStream
- Throws:
IOException
-
getFilename
- Specified by:
getFilenamein interfaceorg.springframework.core.io.Resource- Overrides:
getFilenamein classorg.springframework.core.io.AbstractResource
-
contentLength
public long contentLength()- Specified by:
contentLengthin interfaceorg.springframework.core.io.Resource- Overrides:
contentLengthin classorg.springframework.core.io.AbstractResource
-
getChecksum
-