|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.marre.wap.WspUtil
Method Summary | |
static java.lang.String |
convertMultipartContentType(java.lang.String ct)
Converts from a "multipart/" content type to "vnd.wap..." content type. |
static int |
getHeaderType(java.lang.String headerName)
Converts a header name to a header type (WapConstants.HEADER_*). |
static int |
getParameterType(java.lang.String parameterName)
Converts a parameter name to a parameter type (WapConstants.PARAMETER_*). |
static int |
getWellKnownContentTypeId(byte wspEncodingVersion,
java.lang.String contentType)
Converts a content type to a WINA "well-known" content type id. |
static int |
getWellKnownHeaderId(byte wspEncodingVersion,
int headerType)
Converts a header type (WapConstants.HEADER_*) to a well known header id. |
static int |
getWellKnownParameterId(byte wspEncodingVersion,
int parameterType)
Converts a parameter type (WapConstants.PARAMETER_*) to a well known parameter id. |
static int |
getWellKnownPushAppId(java.lang.String pushApp)
Converts a push app to a WINA "well-known" push app id. |
static int |
getWspParameterType(int wellKnownParameterId)
Converts a parameter name to a parameter type (WapConstants.WSP_PARAMETER_TYPE_*). |
static void |
writeContentType(byte wspEncodingVersion,
java.io.OutputStream theOs,
MimeHeader theContentType)
Writes a wsp encoded content-type as specified in WAP-230-WSP-20010705-a.pdf. |
static void |
writeContentType(byte wspEncodingVersion,
java.io.OutputStream theOs,
java.lang.String theContentType)
Writes a wsp encoded content-type as specified in WAP-230-WSP-20010705-a.pdf. |
static void |
writeExtensionMedia(java.io.OutputStream theOs,
java.lang.String theStr)
Writes an "extension media" in pdu format to the given output stream. |
static void |
writeInteger(java.io.OutputStream theOs,
long theValue)
Writes an "integer" in wsp format to the given output stream. |
static void |
writeLongInteger(java.io.OutputStream theOs,
long theValue)
Writes a "long integer" in wsp format to the given output stream. |
static void |
writeParameter(byte wspEncodingVersion,
java.io.OutputStream os,
java.lang.String name,
java.lang.String value)
|
static void |
writeQuotedString(java.io.OutputStream theOs,
java.lang.String theStr)
|
static void |
writeShortInteger(java.io.OutputStream theOs,
int theValue)
Writes a "short integer" in wsp format to the given output stream. |
static void |
writeTextString(java.io.OutputStream theOs,
java.lang.String theStr)
|
static void |
writeTextValue(java.io.OutputStream theOs,
java.lang.String theStr)
|
static void |
writeTokenText(java.io.OutputStream theOs,
java.lang.String theStr)
|
static void |
writeTypedValue(byte wspEncodingVersion,
java.io.OutputStream os,
int wspParamType,
java.lang.String value)
|
static void |
writeUint8(java.io.OutputStream theOs,
int theValue)
Writes a "uint8" in wsp format to the given output stream. |
static void |
writeUintvar(java.io.OutputStream theOs,
long theValue)
Writes a "Uintvar" in wsp format to the given output stream. |
static void |
writeValueLength(java.io.OutputStream theOs,
long theValue)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static int getHeaderType(java.lang.String headerName)
headerName
- The name of the header.
public static int getWellKnownHeaderId(byte wspEncodingVersion, int headerType)
wspEncodingVersion
- The requested wsp encoding versionheaderType
- The header type
public static int getWellKnownContentTypeId(byte wspEncodingVersion, java.lang.String contentType)
wspEncodingVersion
- The requested wsp encoding versioncontentType
- The content type
public static int getParameterType(java.lang.String parameterName)
parameterName
- The name of the parameter.
public static int getWspParameterType(int wellKnownParameterId)
wellKnownParameterId
- The well known parameter id to lookup.
public static int getWellKnownParameterId(byte wspEncodingVersion, int parameterType)
wspEncodingVersion
- The requested wsp encoding versionparameterType
- The header type
public static int getWellKnownPushAppId(java.lang.String pushApp)
pushApp
- The push app
public static void writeUint8(java.io.OutputStream theOs, int theValue) throws java.io.IOException
theOs
- Stream to write totheValue
- Value to write
java.io.IOException
public static void writeUintvar(java.io.OutputStream theOs, long theValue) throws java.io.IOException
theOs
- Stream to write totheValue
- Value to write
java.io.IOException
public static void writeLongInteger(java.io.OutputStream theOs, long theValue) throws java.io.IOException
theOs
- Stream to write totheValue
- Value to write
java.io.IOException
public static void writeInteger(java.io.OutputStream theOs, long theValue) throws java.io.IOException
theOs
- theValue
-
java.io.IOException
public static void writeShortInteger(java.io.OutputStream theOs, int theValue) throws java.io.IOException
theOs
- Stream to write totheValue
- Value to write
java.io.IOException
public static void writeValueLength(java.io.OutputStream theOs, long theValue) throws java.io.IOException
java.io.IOException
public static void writeExtensionMedia(java.io.OutputStream theOs, java.lang.String theStr) throws java.io.IOException
theOs
- Stream to write totheStr
- Text to write
java.io.IOException
public static void writeTextString(java.io.OutputStream theOs, java.lang.String theStr) throws java.io.IOException
java.io.IOException
public static void writeQuotedString(java.io.OutputStream theOs, java.lang.String theStr) throws java.io.IOException
java.io.IOException
public static void writeTokenText(java.io.OutputStream theOs, java.lang.String theStr) throws java.io.IOException
java.io.IOException
public static void writeTextValue(java.io.OutputStream theOs, java.lang.String theStr) throws java.io.IOException
java.io.IOException
public static void writeContentType(byte wspEncodingVersion, java.io.OutputStream theOs, java.lang.String theContentType) throws java.io.IOException
Uses the "constrained media" format.
Note! This method can only be used on simple content types (like
"text/plain" or "image/gif"). If a more complex content-type is needed
(like "image/gif; start=cid; parameter=value;") you must use the
MimeContentType class.
theOs
- theContentType
-
java.io.IOException
public static void writeContentType(byte wspEncodingVersion, java.io.OutputStream theOs, MimeHeader theContentType) throws java.io.IOException
This method automatically chooses the most compact way to represent the given content type.
theOs
- theContentType
-
java.io.IOException
public static void writeTypedValue(byte wspEncodingVersion, java.io.OutputStream os, int wspParamType, java.lang.String value) throws java.io.IOException
java.io.IOException
public static void writeParameter(byte wspEncodingVersion, java.io.OutputStream os, java.lang.String name, java.lang.String value) throws java.io.IOException
java.io.IOException
public static java.lang.String convertMultipartContentType(java.lang.String ct)
ct
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |