Package de.uplanet.net.http
Enum Class HTTP_METHOD
- All Implemented Interfaces:
Serializable
,Comparable<HTTP_METHOD>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if this method matches the given method value.static String
toHeaderValue
(HTTP_METHOD... p_methods) Convert the given HTTP methods to a comma-separated list suitable for being used as a HTTP header value.static String
toHeaderValue
(Collection<HTTP_METHOD> p_methods) Convert the given HTTP methods to a comma-separated list suitable for being used as a HTTP header value.toNames
(HTTP_METHOD... p_methods) Convert the given HTTP methods to a list of strings.toNames
(Collection<HTTP_METHOD> p_methods) Convert the given HTTP methods to a list of strings.static HTTP_METHOD
Returns the enum constant of this class with the specified name.static HTTP_METHOD[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
GET
-
HEAD
-
POST
-
PUT
-
PATCH
-
DELETE
-
OPTIONS
-
PROPFIND
The WebDAVPROPFIND
method. -
PROPPATCH
The WebDAVPROPPATCH
method. -
MKCOL
The WebDAVMKCOL
method. -
COPY
The WebDAVCOPY
method. -
MOVE
The WebDAVMOVE
method. -
LOCK
The WebDAVLOCK
method. -
UNLOCK
The WebDAVUNLOCK
method.
-
-
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
-
matches
Check if this method matches the given method value.- Parameters:
p_strMethod
- The HTTP method.- Returns:
true
if the given value matches this method, orfalse
otherwise.
-
toNames
Convert the given HTTP methods to a list of strings.- Parameters:
p_methods
- The HTTP methods.- Returns:
- The given methods as a list of strings.
-
toNames
Convert the given HTTP methods to a list of strings.- Parameters:
p_methods
- The HTTP methods.- Returns:
- The given methods as a list of strings.
-
toHeaderValue
Convert the given HTTP methods to a comma-separated list suitable for being used as a HTTP header value.If the list of given methods is empty,
null
will be returned.- Parameters:
p_methods
- The HTTP methods.- Returns:
- A comma-separated list of methods, or
null
.
-
toHeaderValue
Convert the given HTTP methods to a comma-separated list suitable for being used as a HTTP header value.If the list of given methods is
null
or empty, this method returnsnull
.- Parameters:
p_methods
- The HTTP methods.- Returns:
- A comma-separated list of methods, or
null
.
-