Package com.teamdev.jxbrowser.net
Interface ByteData
- All Superinterfaces:
UploadData
An upload data as a sequence of bytes.
-
Method Summary
Modifier and TypeMethodDescriptiondefault byte[]
bytes()
Returns an array containing the upload data bytes of the associated URL request.default ContentType
Returns the content type of this upload data as specified in theContent-Type
header.static ByteData
of
(byte[] data) Creates an instance ofByteData
with the given upload data bytes.static ByteData
of
(byte[] data, ContentType contentType) Creates an instance ofByteData
with the given upload data bytes and content type.static ByteData
Creates an instance ofByteData
with the given upload data bytes.static ByteData
of
(String data, ContentType contentType) Creates an instance ofByteData
with the given upload data bytes and content type.
-
Method Details
-
of
Creates an instance ofByteData
with the given upload data bytes.The bytes are retrieved from the
data
string using theString.getBytes(Charset)
method with the UTF-8 charset. -
of
Creates an instance ofByteData
with the given upload data bytes. -
of
Creates an instance ofByteData
with the given upload data bytes and content type.The bytes are retrieved from the
data
string using theString.getBytes(Charset)
method with the UTF-8 charset.- Since:
- 7.33
-
of
Creates an instance ofByteData
with the given upload data bytes and content type.- Since:
- 7.33
-
bytes
default byte[] bytes()Description copied from interface:UploadData
Returns an array containing the upload data bytes of the associated URL request.If the upload data is constructed manually and is not associated with a URL request, returns an empty array.
- Specified by:
bytes
in interfaceUploadData
-
contentType
Description copied from interface:UploadData
Returns the content type of this upload data as specified in theContent-Type
header.If the upload data is constructed manually, the
Content-Type
header will be created after it is passed to the Chromium engine. Thus, the returnedContentType
object will not contain meaningful values in this case.- Specified by:
contentType
in interfaceUploadData
-