|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.io.DatagramAddressBase
public class DatagramAddressBase
This is the generic datagram address interface.
Field Summary | ||
---|---|---|
static int |
NONE
Constant value for "no result". |
|
protected String |
_address
|
|
protected int |
_key
|
Constructor Summary | ||
---|---|---|
DatagramAddressBase()
Creates a new DatagramAddressBase instance. |
||
DatagramAddressBase(String address)
Creates a new DatagramAddressBase instance based on an existing address string. |
||
DatagramAddressBase(DatagramAddressBase addressBase)
Creates a new DatagramAddressBase instance based on an existing address base. |
Method Summary | ||
---|---|---|
static void |
appendHex(byte[] buf,
int offset,
int value,
int length)
Appends a hex value to provided byte array. |
|
static void |
appendHex(StringBuffer buf,
int offset,
int value,
int length)
Appends a hex value to provided string buffer. |
|
boolean |
equals(Object addressBase)
Compares this object with provided address base. |
|
String |
getAddress()
Retrieves this object's address. |
|
int |
getKey()
Retrieves this object's key. |
|
String |
getSubAddress()
Retrieves this object's sub-address. |
|
DatagramAddressBase |
getSubAddressBase()
Retrieves this object's sub-address base. |
|
int |
hashCode()
Retrieves hash of this object's address. |
|
static int |
indexOfNextDelim(String str,
int start)
Retrieves index of next delimiter in provided string. |
|
static int |
parseInt(byte[] buf,
int start,
int end,
int radix)
Parse out integer value contained in byte array. |
|
static int |
parseInt(String buf,
int start,
int end,
int radix)
Parse out integer value contained in string. |
|
static long |
parseLong(String buf,
int start,
int end,
int radix)
Parse out long integer value contained in string. |
|
static int |
readInt(byte[] buf,
int offset)
Reads an integer value out of provided buffer. |
|
static short |
readShort(byte[] buf,
int offset)
Reads a short integer value out of provided buffer. |
|
void |
setAddress(String address)
Sets new address for this address base. |
|
static void |
writeInt(byte[] buf,
int offset,
int value)
Writes integer value into provided buffer. |
|
static void |
writeShort(byte[] buf,
int offset,
int value)
Writes short value into provided buffer. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NONE
protected String _address
protected int _key
Constructor Detail |
---|
public DatagramAddressBase()
public DatagramAddressBase(DatagramAddressBase addressBase)
addressBase
- Addres base to use as template for this new object.public DatagramAddressBase(String address)
address
- Address to use for this new object.Method Detail |
---|
public void setAddress(String address)
address
- New address to use for this object.public String getAddress()
public String getSubAddress()
public DatagramAddressBase getSubAddressBase()
public int getKey()
public boolean equals(Object addressBase)
equals
in class Object
addressBase
- Address base to compare with this one.
Boolean.hashCode()
,
Hashtable
public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
Hashtable
public static int indexOfNextDelim(String str, int start)
str
- String to parse through.start
- First character in string to examine.
public static short readShort(byte[] buf, int offset)
buf
- Byte array buffer from which to peel short.offset
- First byte in array to use.
public static int readInt(byte[] buf, int offset)
buf
- Byte array buffer from which to peel integer.offset
- First byte in array to use.
public static void writeInt(byte[] buf, int offset, int value)
buf
- Byte array to receive integer.offset
- Byte position in array at which to write value.value
- Integer value to write.public static void writeShort(byte[] buf, int offset, int value)
buf
- Byte array to receive integer.offset
- Byte position in array at which to write value.value
- Integer value to write.public static int parseInt(String buf, int start, int end, int radix)
buf
- String to examine.start
- First character in string buffer to consider.end
- Last character in string buffer to consider.radix
- Radix to use.
IllegalArugmentException
- If portion of string buffer examined
contains a non-digit character.public static int parseInt(byte[] buf, int start, int end, int radix)
buf
- Byte array to examine.start
- First byte in buffer to consider.end
- Last byte in buffer to consider.radix
- Radix to use.
public static long parseLong(String buf, int start, int end, int radix)
buf
- String to examine.start
- First character in string buffer to consider.end
- Last character in string buffer to consider.radix
- Radix to use.
IllegalArugmentException
- If portion of string buffer examined
contains a non-digit character.public static void appendHex(StringBuffer buf, int offset, int value, int length)
buff
- String buffer to receive appended value.offset
- Point in buffer at which to append value.value
- Value to append to buffer.length
- Maximum length to add to buffer.public static void appendHex(byte[] buf, int offset, int value, int length)
buf
- Byte array to receive appended value.offset
- Point in buffer at which to append value.value
- Value to append to buffer.length
- Maximum length to add to buffer.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.