org.fossilec.odettej.service
Class BufferUtil
java.lang.Object
org.fossilec.odettej.service.BufferUtil
public class BufferUtil
- extends java.lang.Object
Method Summary |
static short |
getUnsignedByte(java.nio.ByteBuffer bb)
|
static short |
getUnsignedByte(java.nio.ByteBuffer bb,
int position)
Return the unsigned value of byte from the position specified in a
ByteBuffer . |
static int |
parseHeaderLengthField(java.nio.ByteBuffer buffer)
Read the lasting three of the first four octets from the Stream
Transmission Buffer regarding the header length field. |
protected static void |
putAtPosition(java.nio.ByteBuffer buffer,
byte[] src,
int position)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BufferUtil
public BufferUtil()
getUnsignedByte
public static short getUnsignedByte(java.nio.ByteBuffer bb,
int position)
- Return the unsigned value of byte from the position specified in a
ByteBuffer
.
- Parameters:
bb
- ByteBuffer
being used.position
- From which position the byte should be extracted.
- Returns:
- The unsigned value of a byte in the indicated position
represented in
short
.
getUnsignedByte
public static short getUnsignedByte(java.nio.ByteBuffer bb)
- Parameters:
bb
-
- Returns:
parseHeaderLengthField
public static int parseHeaderLengthField(java.nio.ByteBuffer buffer)
- Read the lasting three of the first four octets from the Stream
Transmission Buffer regarding the header length field.
- Parameters:
buffer
- Header buffer.
- Returns:
- int Length of the Stream Transmission Buffer from the header
field.
putAtPosition
protected static void putAtPosition(java.nio.ByteBuffer buffer,
byte[] src,
int position)
- Parameters:
src
- position
- length
-
Copyright © 2005 ObjectWeb Consortium. All Rights Reserved.