java.lang.Object
org.firebirdsql.gds.impl.argument.Argument
org.firebirdsql.gds.impl.argument.TypedArgument
org.firebirdsql.gds.impl.argument.SingleItem
- All Implemented Interfaces:
Serializable
,Parameter
Argument
implementation for items without a value.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyTo
(ParameterBuffer buffer, Encoding encoding) Copies this argument into the supplied buffer, uses the suppliedEncoding
for string arguments.boolean
int
int
hashCode()
void
writeTo
(OutputStream outputStream) Writes the arguments to the suppliedOutputStream
in the XDR format of the type.Methods inherited from class org.firebirdsql.gds.impl.argument.Argument
getType, getValueAsInt, getValueAsLong, getValueAsString
-
Constructor Details
-
SingleItem
-
-
Method Details
-
writeTo
Description copied from class:Argument
Writes the arguments to the suppliedOutputStream
in the XDR format of the type.- Specified by:
writeTo
in classArgument
- Parameters:
outputStream
- OutputStream- Throws:
IOException
- For errors writing to the OutputStream
-
getLength
public int getLength()- Specified by:
getLength
in classArgument
- Returns:
- Total length of the buffer item when written to the OutputStream by
Argument.writeTo(java.io.OutputStream)
. This includes the item, the value and other items contributing to the total length (e.g. the length of the value).
-
equals
-
hashCode
public int hashCode() -
copyTo
Description copied from interface:Parameter
Copies this argument into the supplied buffer, uses the suppliedEncoding
for string arguments.An instance of
Parameter
should know how to copy itself into another buffer (eg an instance ofStringArgument
would know to callParameterBuffer.addArgument(int, String, Encoding)
).The parameter does not need to check if it is the right type of destination buffer (if someone tries to add a TPB argument to a DPB they are free to try that).
- Parameters:
buffer
- ParameterBuffer instanceencoding
- Encoding to use for string properties. A value ofnull
can be used to signal that the original encoding should be used.
-