Package org.firebirdsql.gds
Interface ParameterBuffer
- 
- All Superinterfaces:
- java.lang.Iterable<Parameter>
 - All Known Subinterfaces:
- BatchParameterBuffer,- BlobParameterBuffer,- ConnectionParameterBuffer,- DatabaseParameterBuffer,- ServiceParameterBuffer,- ServiceRequestBuffer,- TransactionParameterBuffer
 - All Known Implementing Classes:
- BatchParameterBufferImp,- BlobParameterBufferImp,- DatabaseParameterBufferImp,- ParameterBufferBase,- ServiceParameterBufferImp,- ServiceRequestBufferImp,- TransactionParameterBufferImpl
 
 public interface ParameterBuffer extends java.lang.Iterable<Parameter> Instance of this interface represents a Parameter Buffer it is extended by various parameter buffer interfaces.- Since:
- 3.0
- Author:
- Mark Rotteveel
- See Also:
- ParameterBuffer,- ServiceRequestBuffer,- TransactionParameterBuffer,- ServiceParameterBuffer
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddArgument(int argumentType)Add argument with no parameters.voidaddArgument(int argumentType, byte value)Add a byte argument.voidaddArgument(int argumentType, byte[] content)Add array of bytes.voidaddArgument(int argumentType, int value)Add integer argument.voidaddArgument(int argumentType, long value)Add long argument.voidaddArgument(int argumentType, java.lang.String value)Add string argument with the default encoding.voidaddArgument(int argumentType, java.lang.String value, Encoding encoding)Add string argument.intgetArgumentAsInt(int argumentType)Get argument as int.java.lang.StringgetArgumentAsString(int argumentType)Get argument as string.intgetType()booleanhasArgument(int argumentType)Check if this parameter buffer has specified argument.default booleanisEmpty()java.util.Iterator<Parameter>iterator()Returns an iterator over a copy of the parameters in this parameter buffer.voidremoveArgument(int argumentType)Remove specified argument.intsize()byte[]toBytes()Converts this parameter buffer to a byte array.byte[]toBytesWithType()Converts this parameter buffer to a byte array with type information.XdrabletoXdrable()voidwriteArgumentsTo(java.io.OutputStream outputStream)Writes the arguments in the implementation specific serialization into theOutputStream.
 
- 
- 
- 
Method Detail- 
getTypeint getType() - Returns:
- The parameter buffer type identifier
 
 - 
addArgumentvoid addArgument(int argumentType) Add argument with no parameters.- Parameters:
- argumentType- type of argument.
 
 - 
addArgumentvoid addArgument(int argumentType, java.lang.String value)Add string argument with the default encoding.- Parameters:
- argumentType- type of argument.
- value- string value to add.
 
 - 
addArgumentvoid addArgument(int argumentType, java.lang.String value, Encoding encoding)Add string argument.- Parameters:
- argumentType- type of argument.
- value- string value to add.
- encoding- encoding to use for conversion to bytes
 
 - 
addArgumentvoid addArgument(int argumentType, byte value)Add a byte argument.- Parameters:
- argumentType- type of argument.
- value- byte value to add.
 
 - 
addArgumentvoid addArgument(int argumentType, int value)Add integer argument.- Parameters:
- argumentType- type of argument.
- value- integer value to add.
 
 - 
addArgumentvoid addArgument(int argumentType, long value)Add long argument.- Parameters:
- argumentType- type of argument.
- value- long value to add.
 
 - 
addArgumentvoid addArgument(int argumentType, byte[] content)Add array of bytes.- Parameters:
- argumentType- type of argument.
- content- content of argument.
 
 - 
removeArgumentvoid removeArgument(int argumentType) Remove specified argument.- Parameters:
- argumentType- type of argument to remove.
 
 - 
getArgumentAsStringjava.lang.String getArgumentAsString(int argumentType) Get argument as string.- Parameters:
- argumentType- type of argument to find.
- Returns:
- argument as string or nullif nothing found.
 
 - 
getArgumentAsIntint getArgumentAsInt(int argumentType) Get argument as int.- Parameters:
- argumentType- type of argument to find.
- Returns:
- argument as string or 0if nothing found.
 
 - 
hasArgumentboolean hasArgument(int argumentType) Check if this parameter buffer has specified argument.- Parameters:
- argumentType- type of argument to find.
- Returns:
- trueif this buffer contains specified argument.
 
 - 
iteratorjava.util.Iterator<Parameter> iterator() Returns an iterator over a copy of the parameters in this parameter buffer.It is safe to iterate over this iterator while modifying the parameter buffer. Changes will not be reflected in the iterator. - Specified by:
- iteratorin interface- java.lang.Iterable<Parameter>
- Returns:
- Iterator over the parameters in this parameter buffer.
 
 - 
writeArgumentsTovoid writeArgumentsTo(java.io.OutputStream outputStream) throws java.io.IOExceptionWrites the arguments in the implementation specific serialization into theOutputStream.- Parameters:
- outputStream- The- OutputStreamto write to
- Throws:
- java.io.IOException- Errors produced by the output stream during writes
 
 - 
toXdrableXdrable toXdrable() - Returns:
- Xdrableto write (and optionally read) this instance as Xdr.
 
 - 
toBytesbyte[] toBytes() Converts this parameter buffer to a byte array.This byte array includes the extra header-bytes (if any), but does not include the type information - Returns:
- Byte array with serialization of this parameter buffer
- See Also:
- toBytesWithType()
 
 - 
toBytesWithTypebyte[] toBytesWithType() Converts this parameter buffer to a byte array with type information.This byte array includes the type information and the extra header bytes (if any). - Returns:
- Byte array with serialization of this parameter buffer
- See Also:
- toBytes()
 
 - 
sizeint size() - Returns:
- the number of parameters stored.
 
 - 
isEmptydefault boolean isEmpty() - Returns:
- trueif empty,- falseif this buffer contains at least one parameter
- Since:
- 5.0.8
 
 
- 
 
-