Package com.bea.wli.sb.sources
Class MFLSource
java.lang.Object
com.bea.wli.sb.sources.MFLSource
- All Implemented Interfaces:
Source
This class represents MFL content. MFL data is essentially binary
data that has some logical structure imposed on it by an MFL definition.
CSV is simple example of MFL data, but the structure can be arbitrarily
complex. The logical/in-memory representation of the data is an XML
document, but it's serialized representation is the raw "unstructured"
binary data.
An MFLSource allows for both views of the MFL data. The content is kept in it's logical form as an XmlObject and this can be obtained from the MFLSource. However, the Source serialization methods writeTo() and getInputStream() will yield the binary form.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Transform option used to indicate the MFL resourceFields inherited from interface com.bea.wli.sb.sources.Source
DEFAULT_CHARACTER_SET_ENCODING
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInputStream
(TransformOptions options) Returns streaming byte-baseed representation of the Source's content.static MFLSource
getInstance
(InputStream in, Ref mflRef) static MFLSource
getInstance
(org.apache.xmlbeans.XmlObject xml, Ref mflRef) org.apache.xmlbeans.XmlObject
void
writeTo
(OutputStream out, TransformOptions options) Serializes the Source's content to a byte-based stream.
-
Field Details
-
MFL_REFERENCE_OPTION
Transform option used to indicate the MFL resource- See Also:
-
-
Constructor Details
-
MFLSource
-
-
Method Details
-
getMFLRef
-
getXmlObject
public org.apache.xmlbeans.XmlObject getXmlObject() -
getInputStream
Description copied from interface:Source
Returns 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.- Specified by:
getInputStream
in interfaceSource
- Parameters:
options
- Options used to affect the serialization- Returns:
- an InputStream for retrieving the serialized content
- Throws:
IOException
TransformException
-
writeTo
public void writeTo(OutputStream out, TransformOptions options) throws IOException, TransformException Description copied from interface:Source
Serializes 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.
- Specified by:
writeTo
in interfaceSource
- Parameters:
out
- the OutputStream to which serialized content will be writtenoptions
- TransformOptions used to affect the serialization- Throws:
IOException
TransformException
-
getInstance
- Throws:
TransformException
-
getInstance
-