## org.red5.io.utils
Class IOUtils

    java.lang.Object
      org.red5.io.utils.IOUtils

    public class IOUtils

extends Object

Misc I/O util methods

Field Summary
`static Charset` `CHARSET` UTF-8 is used

Constructor Summary
`IOUtils()`

Method Summary
`static void` `debug(Logger log, String msg, IoBuffer buf)` Format debug message
`static int` `readMediumInt(IoBuffer in)` Reads medium int
`static int` `readMediumInt2(IoBuffer in)` Alternate method for reading medium int
`static int` `readReverseInt(IoBuffer in)` Reads reverse int
`static int` `readUnsignedMediumInt(IoBuffer in)` Reads unsigned medium integer
`static String` `toString(IoBuffer buf)` String representation of byte buffer
`static void` `writeMediumInt(IoBuffer out, int value)` Writes medium integer
`static void` `writeReverseInt(IoBuffer out, int value)` Writes integer in reverse order

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

Field Detail

### CHARSET

    public static final Charset CHARSET

  UTF-8 is used

Constructor Detail

### IOUtils

    public IOUtils()

Method Detail

### writeReverseInt

    public static void writeReverseInt(IoBuffer out,
                                       int value)

  Writes integer in reverse order

  Parameters:
    `out` - Data buffer to fill
    `value` - Integer

### writeMediumInt

    public static void writeMediumInt(IoBuffer out,
                                      int value)

  Writes medium integer

  Parameters:
    `out` - Output buffer
    `value` - Integer to write

### readUnsignedMediumInt

    public static int readUnsignedMediumInt(IoBuffer in)

  Reads unsigned medium integer

  Parameters:
    `in` - Unsigned medium int source
  Returns:
    int value

### readMediumInt

    public static int readMediumInt(IoBuffer in)

  Reads medium int

  Parameters:
    `in` - Source
  Returns:
    int value

### readMediumInt2

    public static int readMediumInt2(IoBuffer in)

  Alternate method for reading medium int

  Parameters:
    `in` - Source
  Returns:
    int value

### readReverseInt

    public static int readReverseInt(IoBuffer in)

  Reads reverse int

  Parameters:
    `in` - Source
  Returns:
    int

### debug

    public static void debug(Logger log,
                             String msg,
                             IoBuffer buf)

  Format debug message

  Parameters:
    `log` - Logger
    `msg` - Message
    `buf` - Byte buffer to debug

### toString

    public static String toString(IoBuffer buf)

  String representation of byte buffer

  Parameters:
    `buf` - Byte buffer
  Returns:
    String representation

Copyright © 2006-2010 The Red5 Project