com.bea.wli.sb.sources
Class AttachmentsSource
java.lang.Object
com.bea.wli.sb.sources.AttachmentsSource
- All Implemented Interfaces:
- Source
public class AttachmentsSource
- extends Object
- implements Source
Source representing a set of attachments. Its stream representation is
equivalent to the stream representation of the $attachments variable. In
otherwords, the stream representation is XML (not MIME!).
Constructor Summary |
AttachmentsSource(AttachmentsType attachments,
SourceRepository repository)
|
AttachmentsSource
public AttachmentsSource(AttachmentsType attachments,
SourceRepository repository)
getRepository
public SourceRepository getRepository()
getAttachments
public AttachmentsType getAttachments()
getAttachmentCount
public int getAttachmentCount()
getInputStream
public InputStream getInputStream(TransformOptions options)
throws IOException,
TransformException
- 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 interface Source
- 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 interface Source
- Parameters:
out
- the OutputStream to which serialized content will be writtenoptions
- TransformOptions used to affect the serialization
- Throws:
IOException
TransformException