com.ibm.websphere.management.repository

Class DocumentContentSource

  1. java.lang.Object
  2. extended bycom.ibm.websphere.management.repository.DocumentContentSource
All implemented interfaces:
java.io.Serializable

  1. public class DocumentContentSource
  2. extends java.lang.Object
  3. 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

Constructor and Description
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

Modifier and Type Method and Description
  1. Document
getDocument()
Retrieves the document in this object.
  1. long
getLastModified()
Retrieves the last modified time of this document.
  1. java.io.InputStream
getSource()
Gets the document source as an input stream.
  1. void
setDocument(Document document)
Sets the document.
  1. void
setLastModified(long t)
Sets the last modified time for this document.
  1. void
setSource(byte[] data)
Sets a byte array as the document source.
  1. void
setSource(java.io.File file)
Sets a File instance as the document source.
  1. 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

  1. public DocumentContentSource(Document doc,
  2. 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

  1. public DocumentContentSource(Document doc,
  2. 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

  1. public DocumentContentSource(Document doc,
  2. 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

  1. public Document getDocument()
Retrieves the document in this object.
Returns:
the document for this object

setDocument

  1. public void setDocument(Document document)
Sets the document.
Parameters:
document - the document to be set for this object

getSource

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

setSource

  1. 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

  1. public void setSource(byte[] data)
Sets a byte array as the document source.
Parameters:
data - byte array to use as the document source

setSource

  1. 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

  1. public long getLastModified()
Retrieves the last modified time of this document.
Returns:
the last modified time for this document

setLastModified

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