Class AMQPOutputStream
- java.lang.Object
-
- org.ow2.joram.mom.amqp.marshalling.AMQPOutputStream
-
public class AMQPOutputStream extends Object
-
-
Field Summary
Fields Modifier and Type Field Description private bytebitAccumulatorprivate intbitMaskprivate intDEFAULT_BUFFER_SIZEprivate static Loggerloggerprivate booleanneedBitFlushprivate OutputStreamout
-
Constructor Summary
Constructors Constructor Description AMQPOutputStream(OutputStream outputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private intarraySize(Object[] value)private voidbitflush()private longfieldValueSize(Object value)private intshortStrSize(String str)private longtableSize(Map table)private voidwriteArray(Object[] array)voidwriteBit(boolean b)voidwriteBoolean(boolean b)voidwriteByte(byte b)voidwriteDouble(double doubleValue)private voidwriteFieldValue(Object value)voidwriteFloat(float floatValue)voidwriteLong(int l)voidwriteLonglong(long l)voidwriteLongstr(LongString str)voidwriteOctet(byte octet)voidwriteOctet(int octet)voidwriteShort(int s)voidwriteShort(short s)voidwriteShortstr(String str)voidwriteTable(Map table)voidwriteTimestamp(Date timestamp)
-
-
-
Field Detail
-
logger
private static final Logger logger
-
DEFAULT_BUFFER_SIZE
private final int DEFAULT_BUFFER_SIZE
- See Also:
- Constant Field Values
-
needBitFlush
private boolean needBitFlush
-
bitAccumulator
private byte bitAccumulator
-
bitMask
private int bitMask
-
out
private OutputStream out
-
-
Constructor Detail
-
AMQPOutputStream
public AMQPOutputStream(OutputStream outputStream)
-
-
Method Detail
-
writeShortstr
public final void writeShortstr(String str) throws IOException
- Throws:
IOException
-
writeLongstr
public final void writeLongstr(LongString str) throws IOException
- Throws:
IOException
-
writeShort
public final void writeShort(short s) throws IOException- Throws:
IOException
-
writeShort
public final void writeShort(int s) throws IOException- Throws:
IOException
-
writeLong
public final void writeLong(int l) throws IOException- Throws:
IOException
-
writeLonglong
public final void writeLonglong(long l) throws IOException- Throws:
IOException
-
writeByte
public final void writeByte(byte b) throws IOException- Throws:
IOException
-
bitflush
private final void bitflush() throws IOException- Throws:
IOException
-
writeBit
public final void writeBit(boolean b) throws IOException- Throws:
IOException
-
writeBoolean
public final void writeBoolean(boolean b) throws IOException- Throws:
IOException
-
writeTable
public final void writeTable(Map table) throws IOException
- Throws:
IOException
-
writeFieldValue
private void writeFieldValue(Object value) throws IOException
- Throws:
IOException
-
writeArray
private void writeArray(Object[] array) throws IOException
- Throws:
IOException
-
writeFloat
public final void writeFloat(float floatValue) throws IOException- Throws:
IOException
-
writeDouble
public final void writeDouble(double doubleValue) throws IOException- Throws:
IOException
-
writeOctet
public final void writeOctet(int octet) throws IOException- Throws:
IOException
-
writeOctet
public final void writeOctet(byte octet) throws IOException- Throws:
IOException
-
writeTimestamp
public final void writeTimestamp(Date timestamp) throws IOException
- Throws:
IOException
-
shortStrSize
private int shortStrSize(String str) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
tableSize
private long tableSize(Map table) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
fieldValueSize
private long fieldValueSize(Object value) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
arraySize
private int arraySize(Object[] value) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
-