public interface ProtocolWriter
extends java.lang.AutoCloseable, java.io.Closeable
BytesWriter,
ValueWriter| Modifier and Type | Method and Description |
|---|---|
void |
close()
|
ProtocolWriter |
writeName(java.lang.String name)
Write the name of a parameter
|
ProtocolWriter |
writeValue(boolean value)
Write the value of a parameter
|
ProtocolWriter |
writeValue(double value)
Write the value of a parameter
|
ProtocolWriter |
writeValue(float value)
Write the value of a parameter
|
ProtocolWriter |
writeValue(long value)
Write the value of a parameter
|
ProtocolWriter |
writeValue(java.lang.Object value)
Write the value of a parameter
|
ProtocolWriter |
writeValue(java.lang.String value)
Write the value of a parameter
|
ProtocolWriter writeName(java.lang.String name) throws java.io.IOException
Every call of this method should be followed by a call to one the variants of writeValue()
name - the non-null name of the parameterjava.io.IOException - on a failed IO operationjava.lang.IllegalArgumentException - on a null argumentProtocolWriter writeValue(java.lang.Object value) throws java.io.IOException
Every call to this or the other variants of writeValue() should be preceded by a call to
writeName(String).
The provided argument must be a non-null object, of type String or any of the boxed variants of
primitive types. An object will be accepted if Class.isPrimitive() returns true for the object type.
value - a non-null objectjava.io.IOException - on a failed IO operationjava.lang.IllegalArgumentException - on a null argumentjava.lang.IllegalArgumentException - if the argument is of invalid typeProtocolWriter writeValue(java.lang.String value) throws java.io.IOException
Every call to this or the other variants of writeValue() should be preceded by a call to
writeName(String).
value - a non-null String objectjava.io.IOException - on failed IO operationsjava.lang.IllegalArgumentException - on a null argumentProtocolWriter writeValue(double value) throws java.io.IOException
Every call to this or the other variants of writeValue() should be preceded by a call to
writeName(String).
value - a doublejava.io.IOException - on a failed IO operationProtocolWriter writeValue(float value) throws java.io.IOException
Every call to this or the other variants of writeValue() should be preceded by a call to
writeName(String).
value - a floatjava.io.IOException - on a failed IO operationProtocolWriter writeValue(long value) throws java.io.IOException
Every call to this or the other variants of writeValue() should be preceded by a call to
writeName(String).
value - a longjava.io.IOException - on a failed IO operationProtocolWriter writeValue(boolean value) throws java.io.IOException
Every call to this or the other variants of writeValue() should be preceded by a call to
writeName(String).
value - a booleanjava.io.IOException - on a failed IO operationvoid close()
close in interface java.lang.AutoCloseableclose in interface java.io.Closeable