Oracle Application Server Wireless Java API Reference
B14043-01


oracle.edge.common
Class Converter

java.lang.Object
  extended byoracle.edge.common.Converter


public class Converter
extends java.lang.Object

Utility class for various converting functions such as byte to string and vice versa.


Constructor Summary
Converter()

Method Summary
static byte[] toBytes(java.lang.String value, int numBytes)
Convert from a string into a byte array.
static java.lang.String toDecimalString(byte[] Bytes)
Convert a byte array encoded with decimal integer into a string.
Note: here byte 0 is the most-significant byte.
static java.lang.String toHexString(byte[] Bytes)
Convert a byte array encoded with hexical integer into a string.
Note: here byte 0 is the most-significant byte.
static byte[] toInet4IPAddressBytes(java.lang.String Inet4IPAddressString)
static java.lang.String toOctalString(byte[] Bytes)
Convert a byte array encoded with octal integer into a string.
Note: here byte 0 is the most-significant byte.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Converter

public Converter()

Method Detail

toBytes

public static byte[] toBytes(java.lang.String value,
                             int numBytes)
Convert from a string into a byte array. Note: here byte 0 is the most-significant byte

toDecimalString

public static java.lang.String toDecimalString(byte[] Bytes)
Convert a byte array encoded with decimal integer into a string.
Note: here byte 0 is the most-significant byte.
Parameters:
Bytes - pass-in byte array.
Returns:
decimal string.

toHexString

public static java.lang.String toHexString(byte[] Bytes)
Convert a byte array encoded with hexical integer into a string.
Note: here byte 0 is the most-significant byte.
Parameters:
Bytes - pass-in byte array.
Returns:
hexical string.

toInet4IPAddressBytes

public static byte[] toInet4IPAddressBytes(java.lang.String Inet4IPAddressString)
                                    throws ConvertException
Throws:
ConvertException

toOctalString

public static java.lang.String toOctalString(byte[] Bytes)
Convert a byte array encoded with octal integer into a string.
Note: here byte 0 is the most-significant byte.
Parameters:
Bytes - pass-in byte array.
Returns:
octal string.

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.