Package com.oorian.html.elements.consts
Enum Class FormEncoding
- All Implemented Interfaces:
Serializable,Comparable<FormEncoding>,Constable
Enumeration defining the MIME encoding types for form data submission.
This enum provides type-safe constants for the form element's "enctype" attribute,
which specifies how form data should be encoded before being sent to the server.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionURL-encoded form data (default encoding type).Multipart form data encoding.Plain text encoding. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Gets the MIME type string for this encoding type.toString()static FormEncodingReturns the enum constant of this class with the specified name.static FormEncoding[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
APPLICATION_X_WWW_FORM_URL_ENCODED
URL-encoded form data (default encoding type). All characters are encoded before being sent (spaces become '+', special characters become '%HH'). This is the default encoding type for forms when not specified. -
MULTIPART_FORM_DATA
Multipart form data encoding. Required when uploading files through a form. Data is sent as a multipart message with each form field as a separate part with its own content type. -
TEXT_PLAIN
Plain text encoding. Spaces are converted to '+' symbols but no special characters are encoded. Primarily used for email forms and debugging purposes.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getValue
Gets the MIME type string for this encoding type.- Returns:
- the MIME type value used in the HTML enctype attribute.
-
toString
- Overrides:
toStringin classEnum<FormEncoding>
-