com.ibm.websphere.management.repository
Class DocumentContentSource
- java.lang.Object
-
- com.ibm.websphere.management.repository.DocumentContentSource
-
- All Implemented Interfaces:
- java.io.Serializable
public class DocumentContentSource extends java.lang.Object implements java.io.SerializableA DocumentContentSource contains a complete configuration document, consisting of an input stream from which the document can be read and aDocumentobject with identifying information.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description DocumentContentSource(Document doc, byte[] data)Creates aDocumentContentSourceinstance given a document and a byte array.DocumentContentSource(Document doc, java.io.File file)Creates aDocumentContentSourceinstance given a document and a file.DocumentContentSource(Document doc, java.io.InputStream src)Creates aDocumentContentSourceinstance given a document and an input stream.
-
Method Summary
Methods Modifier and Type Method and Description DocumentgetDocument()Retrieves the document in this object.longgetLastModified()Retrieves the last modified time of this document.java.io.InputStreamgetSource()Gets the document source as an input stream.voidsetDocument(Document document)Sets the document.voidsetLastModified(long t)Sets the last modified time for this document.voidsetSource(byte[] data)Sets a byte array as the document source.voidsetSource(java.io.File file)Sets aFileinstance as the document source.voidsetSource(java.io.InputStream source)Sets an input stream as the document source.
-
-
-
Constructor Detail
-
DocumentContentSource
public DocumentContentSource(Document doc, java.io.InputStream src)
Creates aDocumentContentSourceinstance given a document and an input stream.- Parameters:
doc- the document instancesrc- input stream containing the document contents
-
DocumentContentSource
public DocumentContentSource(Document doc, byte[] data)
Creates aDocumentContentSourceinstance given a document and a byte array.- Parameters:
doc- the document instancedata- byte array containing the document contents
-
DocumentContentSource
public DocumentContentSource(Document doc, java.io.File file)
Creates aDocumentContentSourceinstance given a document and a file.- Parameters:
doc- the document instancefile- 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 aFileinstance 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
-
-