Interface ContentBody
- All Superinterfaces:
AutoCloseable, Closeable
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes thisContentBodyand releases all resources.default OptionalLongA HTTP content type (e.g., "application/json") indicating the type of content.static ContentBodyinputStream(String contentType, InputStream inputStream) static ContentBodybooleanReturnsvoidwriteTo(OutputStream output) The content of this request body, possibly empty.
-
Method Details
-
writeTo
The content of this request body, possibly empty.- Throws:
IOException
-
contentType
String contentType()A HTTP content type (e.g., "application/json") indicating the type of content. -
repeatable
boolean repeatable()Returnstrue
ifwriteTo(OutputStream)may be invoked multiple times. -
contentLength
-
close
void close()Closes thisContentBodyand releases all resources. Callingclose()should never throw, preferring to catch and log.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
path
-
inputStream
-