net.sourceforge.jwap.wsp.multipart
Class MultiPartEntry
java.lang.Object
|
+--net.sourceforge.jwap.wsp.multipart.MultiPartEntry
- public class MultiPartEntry
- extends java.lang.Object
This class represents a Multipart Entry according to WAP-230-WSP.
- Author:
- Michel Marti
Constructor Summary |
MultiPartEntry(java.lang.String contentType,
byte[] data)
Construct a Multipart Entry using the WAP codepage for header encoding. |
MultiPartEntry(java.lang.String contentType,
CodePage codePage,
byte[] data)
Construct a Multipart Entry. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MultiPartEntry
public MultiPartEntry(java.lang.String contentType,
CodePage codePage,
byte[] data)
- Construct a Multipart Entry.
- Parameters:
contentType
- the content-type of the Multipart EntrycodePage
- the codepage to use for header encoding or null to use
the default (WAP) codepagedata
- the payload
MultiPartEntry
public MultiPartEntry(java.lang.String contentType,
byte[] data)
- Construct a Multipart Entry using the WAP codepage for header encoding.
- Parameters:
contentType
- the content-type of the Multipart Entrydata
- the payload
addHeader
public void addHeader(java.lang.String key,
java.lang.String value)
- Add a header to the Multipart Entry.
- Parameters:
key
- the header namevalue
- the header value
getHeaderNames
public java.util.Enumeration getHeaderNames()
getHeader
public java.lang.String getHeader(java.lang.String key)
getHeaders
public java.util.Enumeration getHeaders(java.lang.String key)
getContentType
public java.lang.String getContentType()
getPayload
public byte[] getPayload()
getBytes
public byte[] getBytes()
throws java.io.IOException,
HeaderParseException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object