|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.activemq.io.impl.AbstractPacketWriter
Allows instances implementing Packet interface to be serailized/deserailized
| Field Summary | |
protected int |
wireFormatVersion
|
| Constructor Summary | |
AbstractPacketWriter()
|
|
| Method Summary | |
boolean |
canWrite(Packet packet)
|
int |
getWireFormatVersion()
|
void |
setWireFormatVersion(int version)
Set the wire format version |
protected void |
writeObject(java.lang.Object object,
java.io.DataOutput dataOut)
Simple (but inefficent) utility method to write an object on to a stream |
void |
writePacket(Packet p,
java.io.DataOutput dataOut)
Write a Packet instance to data output stream |
byte[] |
writePacketToByteArray(Packet packet)
Serializes a Packet int a byte array |
protected void |
writeUTF(java.lang.String str,
java.io.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.activemq.io.impl.PacketWriter |
getPacketType |
| Field Detail |
protected int wireFormatVersion
| Constructor Detail |
public AbstractPacketWriter()
| Method Detail |
protected void writeUTF(java.lang.String str,
java.io.DataOutput dataOut)
throws java.io.IOException
str - dataOut -
java.io.IOExceptionpublic boolean canWrite(Packet packet)
canWrite in interface PacketWriterpacket -
protected void writeObject(java.lang.Object object,
java.io.DataOutput dataOut)
throws java.io.IOException
object - dataOut -
java.io.IOException
public byte[] writePacketToByteArray(Packet packet)
throws java.io.IOException
writePacketToByteArray in interface PacketWriterpacket -
java.io.IOException
public void writePacket(Packet p,
java.io.DataOutput dataOut)
throws java.io.IOException
writePacket in interface PacketWriterp - the instance to be seralizeddataOut - the output stream
java.io.IOException - thrown if an error occurspublic void setWireFormatVersion(int version)
setWireFormatVersion in interface PacketWriterversion - public int getWireFormatVersion()
getWireFormatVersion in interface PacketWriter
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||