Package com.rabbitmq.client.impl
Class ValueWriter
- java.lang.Object
-
- com.rabbitmq.client.impl.ValueWriter
-
public class ValueWriter extends java.lang.ObjectHelper class to generate AMQP wire-protocol encoded values.
-
-
Field Summary
Fields Modifier and Type Field Description private static intCOPY_BUFFER_SIZEprivate java.io.DataOutputStreamout
-
Constructor Summary
Constructors Constructor Description ValueWriter(java.io.DataOutputStream out)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidcopy(java.io.InputStream input, java.io.OutputStream output)voidflush()Public API - call this to ensure all accumulated values are correctly written to the output stream.voidwriteArray(java.lang.Object[] value)voidwriteArray(java.util.List<?> value)voidwriteFieldValue(java.lang.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(java.lang.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(java.lang.String str)Public API - encodes a short string.voidwriteTable(java.util.Map<java.lang.String,java.lang.Object> table)Public API - encodes a table.voidwriteTimestamp(java.util.Date timestamp)Public API - encodes a timestamp.
-
-
-
Field Detail
-
out
private final java.io.DataOutputStream out
-
COPY_BUFFER_SIZE
private static final int COPY_BUFFER_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
writeShortstr
public final void writeShortstr(java.lang.String str) throws java.io.IOExceptionPublic API - encodes a short string.- Throws:
java.io.IOException
-
writeLongstr
public final void writeLongstr(LongString str) throws java.io.IOException
Public API - encodes a long string from a LongString.- Throws:
java.io.IOException
-
copy
private static void copy(java.io.InputStream input, java.io.OutputStream output) throws java.io.IOException- Throws:
java.io.IOException
-
writeLongstr
public final void writeLongstr(java.lang.String str) throws java.io.IOExceptionPublic API - encodes a long string from a String.- Throws:
java.io.IOException
-
writeShort
public final void writeShort(int s) throws java.io.IOExceptionPublic API - encodes a short integer.- Throws:
java.io.IOException
-
writeLong
public final void writeLong(int l) throws java.io.IOExceptionPublic API - encodes an integer.- Throws:
java.io.IOException
-
writeLonglong
public final void writeLonglong(long ll) throws java.io.IOExceptionPublic API - encodes a long integer.- Throws:
java.io.IOException
-
writeTable
public final void writeTable(java.util.Map<java.lang.String,java.lang.Object> table) throws java.io.IOExceptionPublic API - encodes a table.- Throws:
java.io.IOException
-
writeFieldValue
public final void writeFieldValue(java.lang.Object value) throws java.io.IOException- Throws:
java.io.IOException
-
writeArray
public final void writeArray(java.util.List<?> value) throws java.io.IOException- Throws:
java.io.IOException
-
writeArray
public final void writeArray(java.lang.Object[] value) throws java.io.IOException- Throws:
java.io.IOException
-
writeOctet
public final void writeOctet(int octet) throws java.io.IOExceptionPublic API - encodes an octet from an int.- Throws:
java.io.IOException
-
writeOctet
public final void writeOctet(byte octet) throws java.io.IOExceptionPublic API - encodes an octet from a byte.- Throws:
java.io.IOException
-
writeTimestamp
public final void writeTimestamp(java.util.Date timestamp) throws java.io.IOExceptionPublic API - encodes a timestamp.- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOExceptionPublic API - call this to ensure all accumulated values are correctly written to the output stream.- Throws:
java.io.IOException
-
-