org.mule.transport.tcp.integration
Class CustomByteProtocol

java.lang.Object
  extended by org.mule.transport.tcp.protocols.AbstractByteProtocol
      extended by org.mule.transport.tcp.integration.CustomByteProtocol
All Implemented Interfaces:
TcpProtocol

public class CustomByteProtocol
extends AbstractByteProtocol


Field Summary
 
Fields inherited from class org.mule.transport.tcp.protocols.AbstractByteProtocol
EOF, NO_STREAM, STREAM_OK
 
Constructor Summary
CustomByteProtocol()
          Create a CustomSerializationProtocol object.
 
Method Summary
 Object read(InputStream is)
          Read bytes until we see '>>>', which ends the message
protected  void writeByteArray(OutputStream os, byte[] data)
          Write the message's bytes to the socket, then terminate each message with '>>>'.
 
Methods inherited from class org.mule.transport.tcp.protocols.AbstractByteProtocol
copy, copy, createResponse, isRethrowExceptionOnRead, nullEmptyArray, safeRead, safeRead, setRethrowExceptionOnRead, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomByteProtocol

public CustomByteProtocol()
Create a CustomSerializationProtocol object.

Method Detail

writeByteArray

protected void writeByteArray(OutputStream os,
                              byte[] data)
                       throws IOException
Write the message's bytes to the socket, then terminate each message with '>>>'.

Overrides:
writeByteArray in class AbstractByteProtocol
Throws:
IOException

read

public Object read(InputStream is)
            throws IOException
Read bytes until we see '>>>', which ends the message

Throws:
IOException


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.