public final class StringArgument extends Argument
Argument
implementation for String valuesConstructor and Description |
---|
StringArgument(int type,
ArgumentType argumentType,
java.lang.String value)
Deprecated.
|
StringArgument(int type,
ArgumentType argumentType,
java.lang.String value,
Encoding encoding) |
Modifier and Type | Method and Description |
---|---|
void |
copyTo(ParameterBuffer buffer,
Encoding stringEncoding)
Copies this argument into the supplied buffer, uses the supplied
Encoding for string arguments. |
boolean |
equals(java.lang.Object other) |
int |
getLength() |
int |
getValueAsInt()
The value of the parameter as int.
|
java.lang.String |
getValueAsString()
The value of the parameter as String.
|
int |
hashCode() |
void |
writeTo(java.io.OutputStream outputStream)
Writes the arguments to the supplied
OutputStream in the XDR format of the type. |
getType, getValueAsLong
@Deprecated public StringArgument(int type, ArgumentType argumentType, java.lang.String value)
public StringArgument(int type, ArgumentType argumentType, java.lang.String value, Encoding encoding)
public void writeTo(java.io.OutputStream outputStream) throws java.io.IOException
Argument
OutputStream
in the XDR format of the type.public int getLength()
getLength
in class Argument
Argument.writeTo(java.io.OutputStream)
.
This includes the item, the value and other items contributing to the total length (eg the length of the value).public java.lang.String getValueAsString()
Parameter
The implementation may throw a RuntimeException if the parameter isn't a string (or shouldn't be used as a string).
getValueAsString
in interface Parameter
getValueAsString
in class Argument
public int getValueAsInt()
Parameter
The implementation may throw a RuntimeException if the parameter isn't an int (or shouldn't be used as an int).
getValueAsInt
in interface Parameter
getValueAsInt
in class Argument
public void copyTo(ParameterBuffer buffer, Encoding stringEncoding)
Parameter
Encoding
for string arguments.
An instance of Parameter
should know how to copy itself into another buffer (eg an instance
of StringArgument
would know to call
ParameterBuffer.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 he is free to try that).
buffer
- ParameterBuffer instancestringEncoding
- Encoding to use for string properties. A value of null
can be used to signal that the
original encoding should be used.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.