Deserializer (Hadoop 0.20.2+320 API)
Date: 2010-06-28

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

## org.apache.hadoop.io.serializer
Interface Deserializer<T>

Type Parameters:
  `T` -

    public interface Deserializer<T>

Provides a facility for deserializing objects of type from an `InputStream`.

Deserializers are stateful, but must not buffer the input since other producers may read from the input between calls to `deserialize(Object)`.

Method Summary
`void` | `close()` Close the underlying input stream and clear up any resources.
`T` | `deserialize(T t)` Deserialize the next object from the underlying input stream.
`void` | `open(InputStream in)` Prepare the deserializer for reading.

Method Detail

### open

    void open(InputStream in)
              throws IOException

  Prepare the deserializer for reading.

  Throws:
    `IOException`

### deserialize

    T deserialize(T t)
                  throws IOException

  Deserialize the next object from the underlying input stream. If the object `t` is non-null then this deserializer may set its internal state to the next object read from the input stream. Otherwise, if the object `t` is null a new deserialized object will be created.

  Returns:
    the deserialized object
  Throws:
    `IOException`

### close

    void close()
               throws IOException

  Close the underlying input stream and clear up any resources.

  Throws:
    `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 © 2009 The Apache Software Foundation