Package org.openqa.selenium.remote.http
Class Contents
java.lang.Object
org.openqa.selenium.remote.http.Contents
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
A supplier that can be called multiple times, each invocation must return a new InputStream ready to read. -
Method Summary
Modifier and TypeMethodDescriptionstatic Contents.Supplier
static Contents.Supplier
bytes
(byte[] bytes) static byte[]
bytes
(Contents.Supplier supplier) static Contents.Supplier
empty()
static <T> T
static Reader
reader
(Contents.Supplier supplier, Charset charset) static Reader
reader
(org.openqa.selenium.remote.http.HttpMessage<?> message) static String
static Contents.Supplier
string
(CharSequence value, Charset charset) static String
string
(Contents.Supplier supplier, Charset charset) static String
string
(org.openqa.selenium.remote.http.HttpMessage<?> message) static Reader
utf8Reader
(Contents.Supplier supplier) static Contents.Supplier
utf8String
(CharSequence value) static String
utf8String
(Contents.Supplier supplier)
-
Method Details
-
empty
-
utf8String
-
string
-
bytes
-
bytes
-
utf8String
-
string
-
string
-
utf8Reader
-
reader
-
reader
-
asJson
- Returns:
- an
Contents.Supplier
containing the object converted to a UTF-8 JSON string.
-
fromJson
-
string
- Throws:
IOException
-