org.caleigo.toolkit.tunnel
Interface ITunnelCodec

All Known Implementing Classes:
SerializeCodec

public interface ITunnelCodec

An ITunnelCodec is responsible for transforming messages to and from bytes that can be handled by streams.

Version:
1.00
Author:
Dennis Zikovic

Method Summary
 java.lang.Object decode(java.io.InputStream in)
          Reads bytes from the InputStream and transforms them into a message that is returned.
 void encode(java.lang.Object message, java.io.OutputStream out)
          Transforms a message into bytes and writes them to the OutputStream.
 

Method Detail

encode

public void encode(java.lang.Object message,
                   java.io.OutputStream out)
            throws java.io.IOException
Transforms a message into bytes and writes them to the OutputStream.

Throws:
java.io.IOException

decode

public java.lang.Object decode(java.io.InputStream in)
                        throws java.io.IOException
Reads bytes from the InputStream and transforms them into a message that is returned.

Throws:
java.io.IOException


Copyright © 2005 Caleigo. All Rights Reserved.