Package com.bea.wli.sb.sources
Interface Source
- All Known Subinterfaces:
- SingleUseSource
- All Known Implementing Classes:
- ByteArraySource,- DOMSource,- JavaObjectSource,- JavaXmlSource,- MessageContextSource,- MFLSource,- MimeSource,- SAAJSource,- StreamSource,- StringSource,- XmlObjectSource
public interface Source
An instance of this interface represents source content in some form.  Sources
 may be transformed into other Sources via a Transformer instance.  At minimum,
 a Source must "natively" support conversion to a byte-based stream via the two
 methods defined in this interface.  Source may or may not take into account
 various TransformOptions (e.g. character-set encoding) during serialization.
 
Implementations of this interface may expose getter methods to get at the native underlying content of the Source. In general, this native content should be considered read-only unless the Source is no longer to be used.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringUnless otherwise specified, all sources should the following as the default character-set encoding when (un)marshalling character data.
- 
Method SummaryModifier and TypeMethodDescriptiongetInputStream(TransformOptions options) Returns streaming byte-baseed representation of the Source's content.voidwriteTo(OutputStream os, TransformOptions options) Serializes the Source's content to a byte-based stream.
- 
Field Details- 
DEFAULT_CHARACTER_SET_ENCODINGUnless otherwise specified, all sources should the following as the default character-set encoding when (un)marshalling character data.- See Also:
 
 
- 
- 
Method Details- 
getInputStreamReturns streaming byte-baseed representation of the Source's content. The representation of that serialization is entirely up to the Source. Note that this method may involve an internal transformation, although it should not in any way change the underlying content.- Parameters:
- options- Options used to affect the serialization
- Returns:
- an InputStream for retrieving the serialized content
- Throws:
- IOException
- TransformException
 
- 
writeToSerializes the Source's content to a byte-based stream. The representation of that serialization is entirely up to the Source. The Source is forbidden from closing the provided OutputStream, although it is allowed to flush it. However, flushing the stream should be left to the caller, if possible.Note that this method may involve an internal transformation, although it should not in any way change the underlying content. - Parameters:
- os- the OutputStream to which serialized content will be written
- options- TransformOptions used to affect the serialization
- Throws:
- IOException
- TransformException
 
 
-