Package com.intuit.karate.http
Enum ResourceType
- java.lang.Object
-
- java.lang.Enum<ResourceType>
-
- com.intuit.karate.http.ResourceType
-
- All Implemented Interfaces:
Serializable,Comparable<ResourceType>
public enum ResourceType extends Enum<ResourceType>
- Author:
- pthomas3
-
-
Field Summary
Fields Modifier and Type Field Description String[]contentLikeStringcontentTypeString[]extensions
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResourceTypefromContentType(String ct)static ResourceTypefromFileExtension(String path)static ResourceTypefromObject(Object o)static ResourceTypefromObject(Object o, ResourceType defaultType)StringgetExtension()booleanisBinary()booleanisHtml()booleanisImage()booleanisJson()booleanisScript()booleanisText()booleanisUrlEncodedOrMultipart()booleanisVideo()booleanisXml()static ResourceTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ResourceType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFERRED_JS
public static final ResourceType DEFERRED_JS
-
JS
public static final ResourceType JS
-
JSON
public static final ResourceType JSON
-
CSS
public static final ResourceType CSS
-
ICO
public static final ResourceType ICO
-
PNG
public static final ResourceType PNG
-
GIF
public static final ResourceType GIF
-
JPG
public static final ResourceType JPG
-
SVG
public static final ResourceType SVG
-
MP4
public static final ResourceType MP4
-
PDF
public static final ResourceType PDF
-
HTML
public static final ResourceType HTML
-
XML
public static final ResourceType XML
-
TEXT
public static final ResourceType TEXT
-
WOFF2
public static final ResourceType WOFF2
-
MULTIPART
public static final ResourceType MULTIPART
-
URLENCODED
public static final ResourceType URLENCODED
-
BINARY
public static final ResourceType BINARY
-
RDFXML
public static final ResourceType RDFXML
-
NTRIPLES
public static final ResourceType NTRIPLES
-
TURTLE
public static final ResourceType TURTLE
-
NQUADS
public static final ResourceType NQUADS
-
TRIG
public static final ResourceType TRIG
-
N3
public static final ResourceType N3
-
JSONLD
public static final ResourceType JSONLD
-
-
Method Detail
-
values
public static ResourceType[] 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 (ResourceType c : ResourceType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ResourceType valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
fromFileExtension
public static ResourceType fromFileExtension(String path)
-
getExtension
public String getExtension()
-
isVideo
public boolean isVideo()
-
isImage
public boolean isImage()
-
isUrlEncodedOrMultipart
public boolean isUrlEncodedOrMultipart()
-
isHtml
public boolean isHtml()
-
isJson
public boolean isJson()
-
isXml
public boolean isXml()
-
isText
public boolean isText()
-
isBinary
public boolean isBinary()
-
isScript
public boolean isScript()
-
fromContentType
public static ResourceType fromContentType(String ct)
-
fromObject
public static ResourceType fromObject(Object o)
-
fromObject
public static ResourceType fromObject(Object o, ResourceType defaultType)
-
-