fedora.server.storage.types
Class DatastreamReferencedContent

java.lang.Object
  extended byfedora.server.storage.types.Datastream
      extended byfedora.server.storage.types.DatastreamReferencedContent

public class DatastreamReferencedContent
extends Datastream

Title: DatastreamReferencedContent.java

Description: Referenced Content.

Version:
$Id: DatastreamReferencedContent.java,v 1.20 2005/07/18 21:52:02 wdn5e Exp $
Author:
cwilper@cs.cornell.edu

Field Summary
 
Fields inherited from class fedora.server.storage.types.Datastream
DatastreamAltIDs, DatastreamID, DSControlGrp, DSCreateDT, DSFormatURI, DSInfoType, DSLabel, DSLocation, DSLocationType, DSMIME, DSSize, DSState, DSVersionable, DSVersionID, isNew
 
Constructor Summary
DatastreamReferencedContent()
           
 
Method Summary
 java.io.InputStream getContentStream()
          Gets an InputStream to the content of this externally-referenced datastream.
 
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

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