Top Description Fields Constructors Methods
com.oracle.bmc.http.internal

public Class HeaderUtils

extends Object
Class Inheritance
Imports
com.oracle.bmc.InternalSdk, com.oracle.bmc.model.Range, java.lang.reflect.InvocationTargetException, java.math.BigDecimal, java.util.Date

Utilities to deal with header values.

Field Summary

Modifier and TypeField and Description
public static final String
public static final String
MEDIA_TYPE_APPLICATION_JSON

A String constant representing "application/json"" media type.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static <T> T

Returns:

A new class instance.
toValue
(String
The header name.
headerName
,
String
The header value.
value
,
Class<T>
The class to convert to.
clazz
)

Deserialize a header value to its desired type if possible.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AUTHORIZATION_HEADER_NAMEback to summary
public static final String AUTHORIZATION_HEADER_NAME

See href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.8">HTTP/1.1 documentation</a>.

MEDIA_TYPE_APPLICATION_JSONback to summary
public static final String MEDIA_TYPE_APPLICATION_JSON

A String constant representing "application/json"" media type.

Constructor Detail

HeaderUtilsback to summary
public HeaderUtils()

Method Detail

toValueback to summary
public static <T> T toValue(String headerName, String value, Class<T> clazz)

Deserialize a header value to its desired type if possible.

Parameters
headerName:String

The header name.

value:String

The header value.

clazz:Class<T>

The class to convert to.

Returns:T

A new class instance.

Annotations
@SuppressWarnings:unchecked
@InternalSdk
backwardCompatibilityRequired:true