org.apache.geronimo.network.protocol.util
Class PacketUtil
java.lang.Object
org.apache.geronimo.network.protocol.util.PacketUtil
- public class PacketUtil
- extends Object
- Version:
- $Revision: 1.3 $ $Date: 2004/03/18 04:05:27 $
Method Summary |
static ByteBuffer |
consolidate(Collection packets)
|
static Boolean |
getBoolean(ByteBuffer buffer)
|
static int |
getBooleanSize()
|
static Byte |
getByte(ByteBuffer buffer)
|
static byte[] |
getByteArray(ByteBuffer buffer)
|
static int |
getByteArraySize(byte[] array)
|
static int |
getByteSize()
|
static Character |
getCharacter(ByteBuffer buffer)
|
static int |
getCharacterSize()
|
static Double |
getDouble(ByteBuffer buffer)
|
static int |
getDoubleSize()
|
static ByteBuffer |
getFirstNonEmpty(Collection packets)
|
static Float |
getFloat(ByteBuffer buffer)
|
static int |
getFloatSize()
|
static Integer |
getInt(ByteBuffer buffer)
|
static int |
getIntSize()
|
static Long |
getLong(ByteBuffer buffer)
|
static int |
getLongSize()
|
static Object |
getPrimitive(ByteBuffer buffer)
|
static int |
getPrimitiveSize(Object object)
|
static int |
getRemaining(Collection packets)
|
static Short |
getShort(ByteBuffer buffer)
|
static int |
getShortSize()
|
static String |
getString(ByteBuffer buffer)
|
static int |
getStringSize(String string)
|
static boolean |
isPrimitive(Object object)
|
static ByteBuffer |
putBoolean(Boolean b)
|
static ByteBuffer |
putBoolean(ByteBuffer buffer,
Boolean b)
|
static ByteBuffer |
putByte(ByteBuffer buffer,
Byte b)
|
static ByteBuffer |
putByteArray(byte[] array)
|
static ByteBuffer |
putByteArray(ByteBuffer buffer,
byte[] array)
|
static ByteBuffer |
putCharacter(ByteBuffer buffer,
Character c)
|
static ByteBuffer |
putCharacter(Character c)
|
static ByteBuffer |
putDouble(ByteBuffer buffer,
Double d)
|
static ByteBuffer |
putDouble(Double d)
|
static ByteBuffer |
putFloat(ByteBuffer buffer,
Float f)
|
static ByteBuffer |
putFloat(Float f)
|
static ByteBuffer |
putInt(ByteBuffer buffer,
Integer i)
|
static ByteBuffer |
putInt(Integer i)
|
static ByteBuffer |
putLong(ByteBuffer buffer,
Long l)
|
static ByteBuffer |
putLong(Long l)
|
static ByteBuffer |
putPrimitive(ByteBuffer buffer,
Object object)
|
static ByteBuffer |
putShort(ByteBuffer buffer,
Short s)
|
static ByteBuffer |
putShort(Short s)
|
static ByteBuffer |
putString(ByteBuffer buffer,
String string)
|
static ByteBuffer |
putString(String string)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NULL_TYPE
public static final byte NULL_TYPE
- See Also:
- Constant Field Values
BOOLEAN_TYPE
public static final byte BOOLEAN_TYPE
- See Also:
- Constant Field Values
CHARACTER_TYPE
public static final byte CHARACTER_TYPE
- See Also:
- Constant Field Values
BYTE_TYPE
public static final byte BYTE_TYPE
- See Also:
- Constant Field Values
SHORT_TYPE
public static final byte SHORT_TYPE
- See Also:
- Constant Field Values
INTEGER_TYPE
public static final byte INTEGER_TYPE
- See Also:
- Constant Field Values
LONG_TYPE
public static final byte LONG_TYPE
- See Also:
- Constant Field Values
FLOAT_TYPE
public static final byte FLOAT_TYPE
- See Also:
- Constant Field Values
DOUBLE_TYPE
public static final byte DOUBLE_TYPE
- See Also:
- Constant Field Values
STRING_TYPE
public static final byte STRING_TYPE
- See Also:
- Constant Field Values
PacketUtil
public PacketUtil()
getFirstNonEmpty
public static ByteBuffer getFirstNonEmpty(Collection packets)
getRemaining
public static int getRemaining(Collection packets)
consolidate
public static ByteBuffer consolidate(Collection packets)
isPrimitive
public static boolean isPrimitive(Object object)
putPrimitive
public static ByteBuffer putPrimitive(ByteBuffer buffer,
Object object)
getPrimitive
public static Object getPrimitive(ByteBuffer buffer)
getPrimitiveSize
public static int getPrimitiveSize(Object object)
putString
public static ByteBuffer putString(ByteBuffer buffer,
String string)
putString
public static ByteBuffer putString(String string)
getString
public static String getString(ByteBuffer buffer)
getByteArraySize
public static int getByteArraySize(byte[] array)
putByteArray
public static ByteBuffer putByteArray(ByteBuffer buffer,
byte[] array)
putByteArray
public static ByteBuffer putByteArray(byte[] array)
getByteArray
public static byte[] getByteArray(ByteBuffer buffer)
getStringSize
public static int getStringSize(String string)
putBoolean
public static ByteBuffer putBoolean(ByteBuffer buffer,
Boolean b)
putBoolean
public static ByteBuffer putBoolean(Boolean b)
getBoolean
public static Boolean getBoolean(ByteBuffer buffer)
getBooleanSize
public static int getBooleanSize()
putCharacter
public static ByteBuffer putCharacter(ByteBuffer buffer,
Character c)
putCharacter
public static ByteBuffer putCharacter(Character c)
getCharacter
public static Character getCharacter(ByteBuffer buffer)
getCharacterSize
public static int getCharacterSize()
putByte
public static ByteBuffer putByte(ByteBuffer buffer,
Byte b)
getByte
public static Byte getByte(ByteBuffer buffer)
getByteSize
public static int getByteSize()
putShort
public static ByteBuffer putShort(ByteBuffer buffer,
Short s)
putShort
public static ByteBuffer putShort(Short s)
getShort
public static Short getShort(ByteBuffer buffer)
getShortSize
public static int getShortSize()
putInt
public static ByteBuffer putInt(ByteBuffer buffer,
Integer i)
putInt
public static ByteBuffer putInt(Integer i)
getInt
public static Integer getInt(ByteBuffer buffer)
getIntSize
public static int getIntSize()
putLong
public static ByteBuffer putLong(ByteBuffer buffer,
Long l)
putLong
public static ByteBuffer putLong(Long l)
getLong
public static Long getLong(ByteBuffer buffer)
getLongSize
public static int getLongSize()
putFloat
public static ByteBuffer putFloat(ByteBuffer buffer,
Float f)
putFloat
public static ByteBuffer putFloat(Float f)
getFloat
public static Float getFloat(ByteBuffer buffer)
getFloatSize
public static int getFloatSize()
putDouble
public static ByteBuffer putDouble(ByteBuffer buffer,
Double d)
putDouble
public static ByteBuffer putDouble(Double d)
getDouble
public static Double getDouble(ByteBuffer buffer)
getDoubleSize
public static int getDoubleSize()
Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.