Module org.firebirdsql.jaybird
Package org.firebirdsql.gds.impl.argument

# Enum Class ArgumentType

java.lang.Object
java.lang.Enum<ArgumentType>
org.firebirdsql.gds.impl.argument.ArgumentType

All Implemented Interfaces:
  `Serializable`, `Comparable<ArgumentType>`, `Constable`

public enum ArgumentType extends Enum<ArgumentType>
Argument metadata type.

Indicates how the argument should be represented in the parameter buffer. Primary use case is to distinguish between 3.0 "wide" arguments, and 2.5 and earlier "traditional" arguments.

Since:
  3.0
Author:
  Mark Rotteveel

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`BigIntSpb`
`ByteSpb`
`IntSpb`
`SingleTpb`
`StringSpb`
`TraditionalDpb`
`Wide`

## Method Summary

Modifier and Type
Method
Description
`abstract int`
`getLengthSize()`
`abstract int`
`getMaxLength()`
`static ArgumentType`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static ArgumentType[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.
`abstract void`
`writeLength(int length, OutputStream outputStream)`
Writes the length into the stream in the proper format.

### Methods inherited from class java.lang.Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### TraditionalDpb

public static final ArgumentType TraditionalDpb

### SingleTpb

public static final ArgumentType SingleTpb

### StringSpb

public static final ArgumentType StringSpb

### BigIntSpb

public static final ArgumentType BigIntSpb

### IntSpb

public static final ArgumentType IntSpb

### ByteSpb

public static final ArgumentType ByteSpb

### Wide

public static final ArgumentType Wide

## Method Details

### values

public static ArgumentType[] values()
Returns an array containing the constants of this enum class, in the order they are declared.

Returns:
  an array containing the constants of this enum class, in the order they are declared

### valueOf

public static ArgumentType valueOf(String name)
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum class has no constant with the specified name
  `NullPointerException` - if the argument is null

### getLengthSize

public abstract int getLengthSize()

Returns:
  The size of the encoded length; `0` (zero) if the length is not part of the message.

### getMaxLength

public abstract int getMaxLength()

Returns:
  The maximum length of encoded data.

### writeLength

public abstract void writeLength(int length, OutputStream outputStream) throws IOException
Writes the length into the stream in the proper format.

For arguments without encoded length, this method should not do anything.

Parameters:
  `length` - length to encode
  `outputStream` - Output stream
Throws:
  `IOException` - For errors writing to the stream