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 void
flush()
Public API - call this to ensure all accumulated values are correctly written to the output stream.void
writeArray(Object[] value)
void
writeArray(List<?> value)
void
writeFieldValue(Object value)
void
writeLong(int l)
Public API - encodes an integer.void
writeLonglong(long ll)
Public API - encodes a long integer.void
writeLongstr(LongString str)
Public API - encodes a long string from a LongString.void
writeLongstr(String str)
Public API - encodes a long string from a String.void
writeOctet(byte octet)
Public API - encodes an octet from a byte.void
writeOctet(int octet)
Public API - encodes an octet from an int.void
writeShort(int s)
Public API - encodes a short integer.void
writeShortstr(String str)
Public API - encodes a short string.void
writeTable(Map<String,Object> table)
Public API - encodes a table.void
writeTimestamp(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 IOException
Public API - encodes a short integer.- Throws:
IOException
-
writeLong
public final void writeLong(int l) throws IOException
Public API - encodes an integer.- Throws:
IOException
-
writeLonglong
public final void writeLonglong(long ll) throws IOException
Public 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 IOException
Public API - encodes an octet from an int.- Throws:
IOException
-
writeOctet
public final void writeOctet(byte octet) throws IOException
Public 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 IOException
Public API - call this to ensure all accumulated values are correctly written to the output stream.- Throws:
IOException
-
-