Package com.rabbitmq.client.impl
Class ValueWriter
- java.lang.Object
-
- com.rabbitmq.client.impl.ValueWriter
-
public class ValueWriter extends Object
Helper class to generate AMQP wire-protocol encoded values.
-
-
Constructor Summary
Constructors Constructor Description ValueWriter(DataOutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()Public API - call this to ensure all accumulated values are correctly written to the output stream.voidwriteArray(Object[] value)voidwriteArray(List<?> value)voidwriteFieldValue(Object value)voidwriteLong(int l)Public API - encodes an integer.voidwriteLonglong(long ll)Public API - encodes a long integer.voidwriteLongstr(LongString str)Public API - encodes a long string from a LongString.voidwriteLongstr(String str)Public API - encodes a long string from a String.voidwriteOctet(byte octet)Public API - encodes an octet from a byte.voidwriteOctet(int octet)Public API - encodes an octet from an int.voidwriteShort(int s)Public API - encodes a short integer.voidwriteShortstr(String str)Public API - encodes a short string.voidwriteTable(Map<String,Object> table)Public API - encodes a table.voidwriteTimestamp(Date timestamp)Public API - encodes a timestamp.
-
-
-
Constructor Detail
-
ValueWriter
public ValueWriter(DataOutputStream out)
-
-
Method Detail
-
writeShortstr
public final void writeShortstr(String str) throws IOException
Public API - encodes a short string.- Throws:
IOException
-
writeLongstr
public final void writeLongstr(LongString str) throws IOException
Public API - encodes a long string from a LongString.- Throws:
IOException
-
writeLongstr
public final void writeLongstr(String str) throws IOException
Public API - encodes a long string from a String.- Throws:
IOException
-
writeShort
public final void writeShort(int s) throws IOExceptionPublic API - encodes a short integer.- Throws:
IOException
-
writeLong
public final void writeLong(int l) throws IOExceptionPublic API - encodes an integer.- Throws:
IOException
-
writeLonglong
public final void writeLonglong(long ll) throws IOExceptionPublic API - encodes a long integer.- Throws:
IOException
-
writeTable
public final void writeTable(Map<String,Object> table) throws IOException
Public API - encodes a table.- Throws:
IOException
-
writeFieldValue
public final void writeFieldValue(Object value) throws IOException
- Throws:
IOException
-
writeArray
public final void writeArray(List<?> value) throws IOException
- Throws:
IOException
-
writeArray
public final void writeArray(Object[] value) throws IOException
- Throws:
IOException
-
writeOctet
public final void writeOctet(int octet) throws IOExceptionPublic API - encodes an octet from an int.- Throws:
IOException
-
writeOctet
public final void writeOctet(byte octet) throws IOExceptionPublic API - encodes an octet from a byte.- Throws:
IOException
-
writeTimestamp
public final void writeTimestamp(Date timestamp) throws IOException
Public API - encodes a timestamp.- Throws:
IOException
-
flush
public void flush() throws IOExceptionPublic API - call this to ensure all accumulated values are correctly written to the output stream.- Throws:
IOException
-
-