com.sun.xml.ws.encoding
Interface RootOnlyCodec

All Superinterfaces:
Codec
All Known Implementing Classes:
StreamSOAP11Codec, StreamSOAP12Codec, StreamSOAPCodec

public interface RootOnlyCodec
extends Codec

Codec that works only on the root part of the MIME/multipart. It doesn't work on the attachment parts, so it takes AttachmentSet as an argument and creates a corresponding Message. This enables attachments to be parsed lazily by wrapping the mimepull parser into an AttachmentSet


Method Summary
 void decode(InputStream in, String contentType, Packet packet, AttachmentSet att)
          Reads root part bytes from InputStream and constructs a Message along with the given attachments.
 void decode(ReadableByteChannel in, String contentType, Packet packet, AttachmentSet att)
           
 
Methods inherited from interface com.sun.xml.ws.api.pipe.Codec
copy, decode, decode, encode, encode, getMimeType, getStaticContentType
 

Method Detail

decode

void decode(@NotNull
            InputStream in,
            @NotNull
            String contentType,
            @NotNull
            Packet packet,
            @NotNull
            AttachmentSet att)
            throws IOException
Reads root part bytes from InputStream and constructs a Message along with the given attachments.

Parameters:
in - root part's data
contentType - root part's MIME content type (like "application/xml")
packet - the new created Message is set in this packet
att - attachments
Throws:
IOException - if InputStream throws an exception.

decode

void decode(@NotNull
            ReadableByteChannel in,
            @NotNull
            String contentType,
            @NotNull
            Packet packet,
            @NotNull
            AttachmentSet att)
See Also:
decode(InputStream, String, Packet, AttachmentSet)