fedora.server.storage.types
Class DatastreamReferencedContent

java.lang.Object
  extended by fedora.server.storage.types.Datastream
      extended by fedora.server.storage.types.DatastreamReferencedContent

public class DatastreamReferencedContent
extends Datastream

Title: DatastreamReferencedContent.java

Description: Referenced Content.

Version:
$Id: DatastreamReferencedContent.java 5312 2006-12-06 12:12:48Z rlw $
Author:
cwilper@cs.cornell.edu

Field Summary
 
Fields inherited from class fedora.server.storage.types.Datastream
autoChecksum, CHECKSUM_IOEXCEPTION, CHECKSUMTYPE_DISABLED, DatastreamAltIDs, DatastreamID, defaultChecksumType, DSChecksum, DSChecksumType, DSControlGrp, DSCreateDT, DSFormatURI, DSInfoType, DSLabel, DSLocation, DSLocationType, DSMIME, DSSize, DSState, DSVersionable, DSVersionID, isNew
 
Constructor Summary
DatastreamReferencedContent()
           
 
Method Summary
 Datastream copy()
           
 java.io.InputStream getContentStream()
          Gets an InputStream to the content of this externally-referenced datastream.
 
Methods inherited from class fedora.server.storage.types.Datastream
compareChecksum, copy, getChecksum, getChecksumType, getContentStreamForChecksum, getDefaultChecksumType, setChecksum, validateChecksumType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatastreamReferencedContent

public DatastreamReferencedContent()
Method Detail

copy

public Datastream copy()
Overrides:
copy in class Datastream

getContentStream

public java.io.InputStream getContentStream()
                                     throws StreamIOException
Gets an InputStream to the content of this externally-referenced datastream.

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.

Overrides:
getContentStream in class Datastream
Throws:
StreamIOException