public interface BodyWriter
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
Ensures the bytes written to the body are all transmitted to the server and clears
the local buffer.
|
void |
write(byte[] bytes)
Write a byte array into the request body.
|
void |
write(byte[] bytes,
int lengthToWriteFromStart)
Write a portion of a byte array into the request body.
|
void write(byte[] bytes)
throws IOException
bytes - array with the bytes to writeIOException - if an error occurs while writingvoid write(byte[] bytes,
int lengthToWriteFromStart)
throws IOException
bytes - array with the bytes to writelengthToWriteFromStart - how many bytes to write, starting from the first one in
the arrayIOException - if an error occurs while writingvoid flush()
throws IOException
IOException - if an error occurs while flushing the buffer