Enum 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.

    Mark Rotteveel
    • 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())
        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.)
        name - the name of the enum constant to be returned.
        the enum constant with the specified name
        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()
        The size of the encoded length; 0 (zero) if the length is not part of the message.
      • getMaxLength

        public abstract int getMaxLength()
        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.

        length - length to encode
        outputStream - Output stream
        java.io.IOException - For errors writing to the stream