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.Serializable
A DocumentContentSource contains a complete configuration document, consisting of an input stream from which the document can be read and aDocument
object with identifying information.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description DocumentContentSource(Document doc, byte[] data)
Creates aDocumentContentSource
instance given a document and a byte array.DocumentContentSource(Document doc, java.io.File file)
Creates aDocumentContentSource
instance given a document and a file.DocumentContentSource(Document doc, java.io.InputStream src)
Creates aDocumentContentSource
instance given a document and an input stream.
-
Method Summary
Methods Modifier and Type Method and Description 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 aFile
instance as the document source.void
setSource(java.io.InputStream source)
Sets an input stream as the document source.
-
-
-
Constructor Detail
-
DocumentContentSource
public DocumentContentSource(Document doc, java.io.InputStream src)
Creates aDocumentContentSource
instance 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 aDocumentContentSource
instance 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 aDocumentContentSource
instance 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 aFile
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
-
-