IBM WebSphere Application ServerTM
Release 7

com.ibm.websphere.management.repository
Class DocumentContentSource

java.lang.Object
  extended by com.ibm.websphere.management.repository.DocumentContentSource
All Implemented Interfaces:
java.io.Serializable

public class DocumentContentSource
extends java.lang.Object
implements java.io.Serializable

A DocumentContentSource contains a complete configuration document, consisting of an input stream from which the document can be read and a Document object with identifying information.

See Also:
Serialized Form

Constructor Summary
DocumentContentSource(Document doc, byte[] data)
          Creates a DocumentContentSource instance given a document and a byte array.
DocumentContentSource(Document doc, java.io.File file)
          Creates a DocumentContentSource instance given a document and a file.
DocumentContentSource(Document doc, java.io.InputStream src)
          Creates a DocumentContentSource instance given a document and an input stream.
 
Method Summary
 Document getDocument()
          Retrieves the document in this object.
 long getLastModified()
          Retrieves the last modified time of this document.
 java.io.InputStream getSource()
          Gets the document source as an input stream.
 void setDocument(Document document)
          Sets the document.
 void setLastModified(long t)
          Sets the last modified time for this document.
 void setSource(byte[] data)
          Sets a byte array as the document source.
 void setSource(java.io.File file)
          Sets a File instance as the document source.
 void setSource(java.io.InputStream source)
          Sets an input stream as the document source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentContentSource

public DocumentContentSource(Document doc,
                             java.io.InputStream src)
Creates a DocumentContentSource instance given a document and an input stream.

Parameters:
doc - the document instance
src - input stream containing the document contents

DocumentContentSource

public DocumentContentSource(Document doc,
                             byte[] data)
Creates a DocumentContentSource instance given a document and a byte array.

Parameters:
doc - the document instance
data - byte array containing the document contents

DocumentContentSource

public DocumentContentSource(Document doc,
                             java.io.File file)
Creates a DocumentContentSource instance given a document and a file.

Parameters:
doc - the document instance
file - file that contains the document contents
Method Detail

getDocument

public Document getDocument()
Retrieves the document in this object.

Returns:
the document for this object

setDocument

public void setDocument(Document document)
Sets the document.

Parameters:
document - the document to be set for this object

getSource

public java.io.InputStream getSource()
Gets the document source as an input stream.

Returns:
an input stream containing the document source

setSource

public void setSource(java.io.InputStream source)
Sets an input stream as the document source.

Parameters:
source - the input stream to use as the document source

setSource

public void setSource(byte[] data)
Sets a byte array as the document source.

Parameters:
data - byte array to use as the document source

setSource

public void setSource(java.io.File file)
Sets a File instance as the document source.

Parameters:
file - file to use as the document source

getLastModified

public long getLastModified()
Retrieves the last modified time of this document.

Returns:
the last modified time for this document

setLastModified

public void setLastModified(long t)
Sets the last modified time for this document.

Parameters:
t - last modified time

IBM WebSphere Application ServerTM
Release 7