Enum JDKHttpClient.BodyType
- java.lang.Object
-
- java.lang.Enum<JDKHttpClient.BodyType>
-
- com.github.scribejava.core.httpclient.jdk.JDKHttpClient.BodyType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<JDKHttpClient.BodyType>
- Enclosing class:
- JDKHttpClient
private static enum JDKHttpClient.BodyType extends java.lang.Enum<JDKHttpClient.BodyType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BYTE_ARRAYMULTIPARTSTRING
-
Constructor Summary
Constructors Modifier Constructor Description privateBodyType()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) abstract voidsetBody(java.net.HttpURLConnection connection, java.lang.Object bodyContents, boolean requiresBody)static JDKHttpClient.BodyTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static JDKHttpClient.BodyType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BYTE_ARRAY
public static final JDKHttpClient.BodyType BYTE_ARRAY
-
MULTIPART
public static final JDKHttpClient.BodyType MULTIPART
-
STRING
public static final JDKHttpClient.BodyType STRING
-
-
Method Detail
-
values
public static JDKHttpClient.BodyType[] 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 (JDKHttpClient.BodyType c : JDKHttpClient.BodyType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JDKHttpClient.BodyType 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.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
setBody
abstract void setBody(java.net.HttpURLConnection connection, java.lang.Object bodyContents, boolean requiresBody) throws java.io.IOException- Throws:
java.io.IOException
-
-