Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## madkit.netcomm
Class Codec

    java.lang.Object
      madkit.netcomm.Codec

    public class Codec

extends java.lang.Object

Utility class. Provides a simple way to encode and decode Objects.

Version:
  $Revision: 1.2 $
Author:
  Sebastian Rodriguez - sebastian.rodriguez@utbm.fr

Constructor Summary
`Codec()`

Method Summary
`static java.lang.Object` | `decode(byte[] raw)` Decodes an object
`static byte[]` | `encode(java.lang.Object o)` Encodes an object.

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

Constructor Detail

### Codec

    public Codec()

Method Detail

### decode

    public static final java.lang.Object decode(byte[] raw)
                                         throws java.io.IOException,
                                                java.lang.ClassNotFoundException

  Decodes an object

  Parameters:
    `raw` - raw byte format of the object
  Returns:
    the Object
  Throws:
    `java.io.IOException`
    `java.lang.ClassNotFoundException`

### encode

    public static final byte[] encode(java.lang.Object o)
                               throws java.io.IOException

  Encodes an object.

  Parameters:
    `o` - Obejct to encode
  Returns:
    the encoded object
  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.