net.sourceforge.jwap.wsp.header
Class Encoding

java.lang.Object
  |
  +--net.sourceforge.jwap.wsp.header.Encoding

public class Encoding
extends java.lang.Object

This class contains static methods used to encode primitive data types used for encoding WSP data units.

Author:
Michel Marti

Method Summary
static byte[] dateValue(java.util.Date date)
           
static byte[] encodeHeader(short wk, byte[] data)
           
static byte[] encodeHeader(java.lang.String key, byte[] data)
           
static byte[] extensionMedia(java.lang.String value)
           
static byte[] integerValue(long l)
           
static byte[] longInteger(long value)
           
static byte[] qualityFactor(float value)
           
static byte[] quotedString(java.lang.String value)
           
static byte[] shortInteger(short value)
           
static byte[] textString(java.lang.String value)
           
static byte[] tokenText(java.lang.String value)
           
static byte[] uintVar(int v)
           
static byte[] uriValue(java.lang.String value)
           
static byte[] valueLength(byte[] tt)
           
static byte[] valueLength(int i)
           
static byte[] versionValue(int major, int minor)
           
static byte[] versionValue(java.lang.String version)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

textString

public static byte[] textString(java.lang.String value)

extensionMedia

public static byte[] extensionMedia(java.lang.String value)

tokenText

public static byte[] tokenText(java.lang.String value)

shortInteger

public static byte[] shortInteger(short value)

longInteger

public static byte[] longInteger(long value)

uintVar

public static byte[] uintVar(int v)

quotedString

public static byte[] quotedString(java.lang.String value)

dateValue

public static byte[] dateValue(java.util.Date date)

qualityFactor

public static byte[] qualityFactor(float value)

versionValue

public static byte[] versionValue(java.lang.String version)

versionValue

public static byte[] versionValue(int major,
                                  int minor)

valueLength

public static byte[] valueLength(byte[] tt)

valueLength

public static byte[] valueLength(int i)

encodeHeader

public static byte[] encodeHeader(short wk,
                                  byte[] data)

encodeHeader

public static byte[] encodeHeader(java.lang.String key,
                                  byte[] data)

integerValue

public static byte[] integerValue(long l)

uriValue

public static byte[] uriValue(java.lang.String value)