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:
InputStreamSource,Resource
- Direct Known Subclasses:
BitstreamResourceAccessByToken
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.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BitstreamServiceprotected final CitationDocumentServiceprotected final UUIDprotected org.dspace.app.rest.utils.BitstreamResource.BitstreamDocumentprotected final EPersonServiceprotected final Stringprotected final booleanprotected final UUID -
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, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.core.io.Resource
getContentAsByteArray, getContentAsString
-
Field Details
-
name
-
uuid
-
currentUserUUID
-
shouldGenerateCoverPage
protected final boolean shouldGenerateCoverPage -
currentSpecialGroups
-
bitstreamService
-
ePersonService
-
citationDocumentService
-
document
protected org.dspace.app.rest.utils.BitstreamResource.BitstreamDocument document
-
-
Constructor Details
-
BitstreamResource
-
-
Method Details
-
getDescription
-
getInputStream
- Throws:
IOException
-
getFilename
- Specified by:
getFilenamein interfaceResource- Overrides:
getFilenamein classAbstractResource
-
contentLength
- Specified by:
contentLengthin interfaceResource- Overrides:
contentLengthin classAbstractResource- Throws:
IOException
-
getChecksum
-