|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.tngtech.jgiven.attachment.MediaType
public class MediaType
Represents a Media Type.
| Nested Class Summary | |
|---|---|
static class |
MediaType.Type
Represents the type of a Media Type |
| Field Summary | |
|---|---|
static MediaType |
PLAIN_TEXT
|
static MediaType |
PNG
|
| Constructor Summary | |
|---|---|
MediaType(MediaType.Type type,
java.lang.String subType,
boolean binary)
Creates a new MediaType |
|
| Method Summary | |
|---|---|
java.lang.String |
asString()
|
static MediaType |
audio(java.lang.String subType)
Creates a binary audio media type with the given subtype. |
java.lang.String |
getSubType()
The subtype of the Media Type. |
MediaType.Type |
getType()
The type of the Media Type. |
static MediaType |
image(java.lang.String subType)
Creates a binary image media type with the given subtype. |
boolean |
isBinary()
Whether this media type is binary or not. |
static MediaType |
text(java.lang.String subType)
Creates a non-binary text media type with the given subtype. |
static MediaType |
video(java.lang.String subType)
Creates a binary video media type with the given subtype. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final MediaType PNG
public static final MediaType PLAIN_TEXT
| Constructor Detail |
|---|
public MediaType(MediaType.Type type,
java.lang.String subType,
boolean binary)
type - the typesubType - the subtypebinary - whether or not content of this media type is binary. If true, the
content will be encoded as Base64 when stored in the JSON model.| Method Detail |
|---|
public MediaType.Type getType()
public java.lang.String getSubType()
public boolean isBinary()
public java.lang.String asString()
public static MediaType image(java.lang.String subType)
public static MediaType video(java.lang.String subType)
public static MediaType audio(java.lang.String subType)
public static MediaType text(java.lang.String subType)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||