public class DatastreamReferencedContent extends Datastream
autoChecksum, CHECKSUM_IOEXCEPTION, CHECKSUM_NONE, CHECKSUMTYPE_DISABLED, DatastreamAltIDs, DatastreamID, defaultChecksumType, DS_LOCATION_TYPE_INTERNAL, DS_LOCATION_TYPE_URL, DSChecksum, DSChecksumType, DSControlGrp, DSCreateDT, DSFormatURI, DSInfoType, DSLabel, DSLocation, DSLocationType, DSMIME, DSSize, DSState, DSVersionable, DSVersionID, isNew| Constructor and Description |
|---|
DatastreamReferencedContent() |
| Modifier and Type | Method and Description |
|---|---|
Datastream |
copy() |
long |
getContentLength(MIMETypedStream stream)
Returns the length of the content of this stream.
|
InputStream |
getContentStream(Context context)
Gets an InputStream to the content of this externally-referenced
datastream.
|
compareChecksum, copy, getChecksum, getChecksumType, getContentStream, getContentStreamForChecksum, getDefaultChecksumType, setChecksum, validateChecksumTypepublic Datastream copy()
copy in class Datastreampublic InputStream getContentStream(Context context) throws StreamIOException
The DSLocation of this datastream must be non-null before invoking this method.
If successful, the DSMIME type is automatically set based on the web server's response header. If the web server doesn't send a valid Content-type: header, as a last resort, the content-type is guessed by using a map of common extensions to mime-types.
If the content-length header is present in the response, DSSize will be set accordingly.
getContentStream in class DatastreamStreamIOExceptionDatastream.getContentStream()public long getContentLength(MIMETypedStream stream)
stream - the MIMETypedStreamCopyright © 2013 DuraSpace. All Rights Reserved.