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
,ParameterBody
,StringBody
,XmlBody
public abstract class BodyWithContentType<T> extends Body
- Author:
- jamesdbloom
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.common.net.MediaType
contentType
-
Constructor Summary
Constructors Constructor Description BodyWithContentType(Body.Type type, com.google.common.net.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
-
-
-
-
Constructor Detail
-
BodyWithContentType
public BodyWithContentType(Body.Type type, com.google.common.net.MediaType contentType)
-
-
Method Detail
-
getCharset
public Charset getCharset(Charset defaultIfNotSet)
- Overrides:
getCharset
in classBody
-
getContentType
public String getContentType()
- Overrides:
getContentType
in classBody
-
-