fedora.server.storage.types
Class MIMETypedStream

java.lang.Object
  extended by fedora.server.storage.types.MIMETypedStream

public class MIMETypedStream
extends java.lang.Object

Title: MIMETypedStream.java

Description: Data structure for holding a MIME-typed stream.

Version:
$Id: MIMETypedStream.java 6795 2008-03-18 08:22:11Z pangloss $
Author:
rlw@virginia.edu

Field Summary
 Property[] header
           
 java.lang.String MIMEType
           
 
Constructor Summary
MIMETypedStream(java.lang.String MIMEType, java.io.InputStream stream, Property[] header)
          Constructs a MIMETypedStream.
 
Method Summary
 void close()
          Closes the underlying stream if it's not already closed.
 void finalize()
          Ensures the underlying stream is closed at garbage-collection time.
 java.io.InputStream getStream()
           
 void setStream(java.io.InputStream stream)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIMEType

public java.lang.String MIMEType

header

public Property[] header
Constructor Detail

MIMETypedStream

public MIMETypedStream(java.lang.String MIMEType,
                       java.io.InputStream stream,
                       Property[] header)

Constructs a MIMETypedStream.

Parameters:
MIMEType - The MIME type of the byte stream.
stream - The byte stream.
Method Detail

getStream

public java.io.InputStream getStream()

setStream

public void setStream(java.io.InputStream stream)

close

public void close()
Closes the underlying stream if it's not already closed. In the event of an error, a warning will be logged.


finalize

public void finalize()
Ensures the underlying stream is closed at garbage-collection time.

Overrides:
finalize in class java.lang.Object