|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.codehaus.activemq.message.AbstractPacketWriter
Allows instances implementing Packet interface to be serailized/deserailized
| Constructor Summary | |
AbstractPacketWriter()
|
|
| Method Summary | |
boolean |
canWrite(Packet packet)
|
protected void |
writeObject(Object object,
DataOutput dataOut)
Simple (but inefficent) utility method to write an object on to a stream |
void |
writePacket(Packet p,
DataOutput dataOut)
Write a Packet instance to data output stream |
byte[] |
writePacketToByteArray(Packet packet)
Serializes a Packet int a byte array |
protected void |
writeUTF(String str,
DataOutput dataOut)
simple helper method to ensure null strings are catered for |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.codehaus.activemq.message.PacketWriter |
getPacketType |
| Constructor Detail |
public AbstractPacketWriter()
| Method Detail |
protected void writeUTF(String str,
DataOutput dataOut)
throws IOException
str - dataOut -
IOExceptionpublic boolean canWrite(Packet packet)
canWrite in interface PacketWriterpacket -
protected void writeObject(Object object,
DataOutput dataOut)
throws IOException
object - dataOut -
IOException
public byte[] writePacketToByteArray(Packet packet)
throws IOException
writePacketToByteArray in interface PacketWriterpacket -
IOException
public void writePacket(Packet p,
DataOutput dataOut)
throws IOException
writePacket in interface PacketWriterp - the instance to be seralizeddataOut - the output stream
IOException - thrown if an error occurs
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||