Enum Class RpcPacketFieldType

java.lang.Object
java.lang.Enum<RpcPacketFieldType>
com.perforce.p4java.impl.mapbased.rpc.packet.RpcPacketFieldType
All Implemented Interfaces:
Serializable, Comparable<RpcPacketFieldType>, Constable

public enum RpcPacketFieldType extends Enum<RpcPacketFieldType>
Defines the various Perforce RPC packet field types and associated methods. Mainly used to determine whether to treat a packet field value as a string or bytes; most fields are strings, but things like worKRec or depotRec fields are binary pass-throughs from the point of view of the client (they're state keys and / or state records used by the server).
  • Enum Constant Details

    • NONE

      public static final RpcPacketFieldType NONE
      Field type is unknown. Field should probably not be used.
    • TEXT

      public static final RpcPacketFieldType TEXT
      Field is text; possibly UTF-8 encoded.
    • BINARY

      public static final RpcPacketFieldType BINARY
      Field is bytes, not interpreted.
  • Method Details

    • values

      public static RpcPacketFieldType[] 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 RpcPacketFieldType 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
    • getFieldType

      public static RpcPacketFieldType getFieldType(String fieldName)
      Return the field type associated with the passed-in name, if any.
      Parameters:
      fieldName - fieldName
      Returns:
      RpcPacketFieldType