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
  • Enum Constant Details

  • 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