org.red5.io.utils
Class BufferUtils

java.lang.Object
  extended by org.red5.io.utils.BufferUtils

public class BufferUtils
extends Object

Buffer Utility class which reads/writes intergers to the input/output buffer

Author:
The Red5 Project ([email protected]), Luke Hubbard, Codegent Ltd ([email protected]), Andy Shaules ([email protected])

Constructor Summary
BufferUtils()
           
 
Method Summary
static int put(IoBuffer out, IoBuffer in, int numBytesMax)
          Puts input buffer stream to output buffer and returns number of bytes written
static int readMediumInt(IoBuffer in)
          Reads a Medium Int to the in buffer
static int readUnsignedMediumInt(IoBuffer in)
          Reads an unsigned Medium Int from the in buffer
static void writeMediumInt(IoBuffer out, int value)
          Writes a Medium Int to the output buffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferUtils

public BufferUtils()
Method Detail

writeMediumInt

public static void writeMediumInt(IoBuffer out,
                                  int value)
Writes a Medium Int to the output buffer

Parameters:
out - Container to write to
value - Integer to write

readUnsignedMediumInt

public static int readUnsignedMediumInt(IoBuffer in)
Reads an unsigned Medium Int from the in buffer

Parameters:
in - Source
Returns:
int Integer value

readMediumInt

public static int readMediumInt(IoBuffer in)
Reads a Medium Int to the in buffer

Parameters:
in - Source
Returns:
int Medium int

put

public static final int put(IoBuffer out,
                            IoBuffer in,
                            int numBytesMax)
Puts input buffer stream to output buffer and returns number of bytes written

Parameters:
out - Output buffer
in - Input buffer
numBytesMax - Number of bytes max
Returns:
int Number of bytes written


Copyright © 2006-2012 The Red5 Project