org.firebirdsql.gds.impl.argument

## Enum ArgumentType

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

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ArgumentType>

      public enum ArgumentType
      extends java.lang.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

- - ### Enum Constant Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract int` | `getLengthSize()`
    `abstract int` | `getMaxLength()`
    `static ArgumentType` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static ArgumentType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.
    `abstract void` | `writeLength(int length, java.io.OutputStream outputStream)` Writes the length into the stream in the proper format.

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

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

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

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

- - ### Enum Constant Detail

    - #### 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 Detail

    - #### values

          public static ArgumentType[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (ArgumentType c : ArgumentType.values())
              System.out.println(c);

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

    - #### valueOf

          public static ArgumentType valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.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,
                                           java.io.OutputStream outputStream)
                                    throws java.io.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:
        `java.io.IOException` - For errors writing to the stream

Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.