de.huxhorn.lilith.sender
Class MessageWriteByteStrategy

java.lang.Object
  extended by de.huxhorn.lilith.sender.MessageWriteByteStrategy
All Implemented Interfaces:
WriteByteStrategy

public class MessageWriteByteStrategy
extends java.lang.Object
implements WriteByteStrategy


Constructor Summary
MessageWriteByteStrategy()
           
 
Method Summary
 void writeBytes(java.io.DataOutputStream dataOutputStream, byte[] bytes)
          Writes an int containing the length of the byte array followed by the byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageWriteByteStrategy

public MessageWriteByteStrategy()
Method Detail

writeBytes

public void writeBytes(java.io.DataOutputStream dataOutputStream,
                       byte[] bytes)
                throws java.io.IOException
Writes an int containing the length of the byte array followed by the byte array.

Specified by:
writeBytes in interface WriteByteStrategy
Parameters:
dataOutputStream - the stream the bytes will be written to.
bytes - the bytes that are written
Throws:
java.io.IOException - if an exception is thrown while writing the bytes.