Package org.mockserver.model
Class StringBody
-
public class StringBody extends BodyWithContentType<String>
- Author:
- jamesdbloom
-
-
Field Summary
-
Fields inherited from class org.mockserver.model.BodyWithContentType
contentType
-
-
Constructor Summary
Constructors Constructor Description StringBody(String value)
StringBody(String value, boolean subString)
StringBody(String value, boolean subString, com.google.common.net.MediaType contentType)
StringBody(String value, boolean subString, Charset charset)
StringBody(String value, byte[] rawBinaryData, boolean subString, com.google.common.net.MediaType contentType)
StringBody(String value, com.google.common.net.MediaType contentType)
StringBody(String value, Charset charset)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringBody
exact(String body)
static StringBody
exact(String body, com.google.common.net.MediaType contentType)
static StringBody
exact(String body, Charset charset)
byte[]
getRawBytes()
String
getValue()
boolean
isSubString()
static StringBody
subString(String body)
static StringBody
subString(String body, com.google.common.net.MediaType contentType)
static StringBody
subString(String body, Charset charset)
String
toString()
-
Methods inherited from class org.mockserver.model.BodyWithContentType
getCharset, getContentType
-
Methods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
equals, fieldsExcludedFromEqualsAndHashCode, hashCode, key
-
-
-
-
Constructor Detail
-
StringBody
public StringBody(String value)
-
StringBody
public StringBody(String value, com.google.common.net.MediaType contentType)
-
StringBody
public StringBody(String value, boolean subString)
-
StringBody
public StringBody(String value, boolean subString, com.google.common.net.MediaType contentType)
-
StringBody
public StringBody(String value, byte[] rawBinaryData, boolean subString, com.google.common.net.MediaType contentType)
-
-
Method Detail
-
exact
public static StringBody exact(String body)
-
exact
public static StringBody exact(String body, Charset charset)
-
exact
public static StringBody exact(String body, com.google.common.net.MediaType contentType)
-
subString
public static StringBody subString(String body)
-
subString
public static StringBody subString(String body, Charset charset)
-
subString
public static StringBody subString(String body, com.google.common.net.MediaType contentType)
-
getRawBytes
public byte[] getRawBytes()
- Overrides:
getRawBytes
in classBody
-
isSubString
public boolean isSubString()
-
toString
public String toString()
- Overrides:
toString
in classObjectWithJsonToString
-
-