Package org.mockserver.model
Class BodyWithContentType<T>
- java.lang.Object
-
- org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
-
- org.mockserver.model.ObjectWithJsonToString
-
- org.mockserver.model.Not
-
- org.mockserver.model.Body
-
- org.mockserver.model.BodyWithContentType<T>
-
- Direct Known Subclasses:
BinaryBody
,JsonBody
,LogEventBody
,ParameterBody
,StringBody
,XmlBody
public abstract class BodyWithContentType<T> extends Body
- Author:
- jamesdbloom
-
-
Field Summary
Fields Modifier and Type Field Description protected MediaType
contentType
-
Constructor Summary
Constructors Constructor Description BodyWithContentType(Body.Type type, MediaType contentType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Charset
getCharset(Charset defaultIfNotSet)
String
getContentType()
-
Methods inherited from class org.mockserver.model.Body
getRawBytes, getType, getValue
-
Methods inherited from class org.mockserver.model.ObjectWithJsonToString
toString
-
Methods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
equals, fieldsExcludedFromEqualsAndHashCode, hashCode, key
-
-
-
-
Field Detail
-
contentType
protected final MediaType contentType
-
-
Method Detail
-
getCharset
public Charset getCharset(Charset defaultIfNotSet)
- Overrides:
getCharset
in classBody
-
getContentType
public String getContentType()
- Overrides:
getContentType
in classBody
-
-