NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

gov.nist.javax.sip.message
Class MultipartMimeContentImpl

java.lang.Object
  extended by gov.nist.javax.sip.message.MultipartMimeContentImpl
All Implemented Interfaces:
MultipartMimeContent

public class MultipartMimeContentImpl
extends Object
implements MultipartMimeContent

Content list for multipart mime content type.

Author:
M. Ranganathan

Field Summary
static String BOUNDARY
           
 
Constructor Summary
MultipartMimeContentImpl(ContentTypeHeader contentTypeHeader)
          Creates a default content list.
 
Method Summary
 boolean add(Content content)
           
 void addContent(Content content)
          Set the content by its type.
 void createContentList(String body)
          unpack a multipart mime packet and return a list of content packets.
 Content getContentByType(String contentType, String contentSubtype)
           
 Iterator<Content> getContents()
          Retrieve the list of Content that is part of this MultitypeMime content.
 ContentTypeHeader getContentTypeHeader()
          Return the Content type header to assign to the outgoing sip meassage.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BOUNDARY

public static String BOUNDARY
Constructor Detail

MultipartMimeContentImpl

public MultipartMimeContentImpl(ContentTypeHeader contentTypeHeader)
Creates a default content list.

Method Detail

add

public boolean add(Content content)
Specified by:
add in interface MultipartMimeContent

getContentTypeHeader

public ContentTypeHeader getContentTypeHeader()
Description copied from interface: MultipartMimeContent
Return the Content type header to assign to the outgoing sip meassage.

Specified by:
getContentTypeHeader in interface MultipartMimeContent
Returns:

toString

public String toString()
Specified by:
toString in interface MultipartMimeContent
Overrides:
toString in class Object

createContentList

public void createContentList(String body)
                       throws ParseException
unpack a multipart mime packet and return a list of content packets.

Throws:
ParseException

getContentByType

public Content getContentByType(String contentType,
                                String contentSubtype)

addContent

public void addContent(Content content)
Description copied from interface: MultipartMimeContent
Set the content by its type.

Specified by:
addContent in interface MultipartMimeContent

getContents

public Iterator<Content> getContents()
Description copied from interface: MultipartMimeContent
Retrieve the list of Content that is part of this MultitypeMime content.

Specified by:
getContents in interface MultipartMimeContent
Returns:
- the content list. Returns an empty list if no content list present.

NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Submit a bug report or feature request.