org.apache.mina.codec.delimited.serialization

## Class JavaNativeMessageDecoder<IN extends Serializable>

- java.lang.Object
- - org.apache.mina.codec.delimited.IoBufferDecoder<IN>
  - - org.apache.mina.codec.delimited.serialization.JavaNativeMessageDecoder<IN>

- All Implemented Interfaces:
    ProtocolDecoder<IoBuffer,IN,Void>, StatelessProtocolDecoder<IoBuffer,IN>

      public class JavaNativeMessageDecoder<IN extends Serializable>
      extends IoBufferDecoder<IN>

  Decoder providing the built-in Java-deserialization.
  Author:
    Apache MINA Project

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JavaNativeMessageDecoder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `IN` | `decode(IoBuffer input)` Decodes a message from a `IoBuffer` When a truncated input is given to this method it may return null.

    - ### Methods inherited from class org.apache.mina.codec.delimited.IoBufferDecoder

      `createDecoderState, decode, finishDecode`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JavaNativeMessageDecoder

          public JavaNativeMessageDecoder()

  - ### Method Detail

    - #### decode

          public IN decode(IoBuffer input)

      Description copied from class: `IoBufferDecoder`
      Decodes a message from a `IoBuffer`

      When a truncated input is given to this method it may return null. Not all decoder will be able to detect this issue and report it that way. Thanks to prefixing of messages, decoder will only receive appropriately sized ByteBuffers.

      n.b. The decoders used for the prefixing (i.e. `RawInt32` and `VarInt`) have to detect truncated ByteBuffers.

      Specified by:
        `decode` in class `IoBufferDecoder<IN extends Serializable>`
      Parameters:
        `input` - data to be decoded as a TYPE message
      Returns:
        the decoded message on success, null otherwise

Copyright © 2009–2013 Apache MINA Project. All rights reserved.