public class HurlBodyWriter extends BodyWriter
BodyWriter.OnStreamWriteListener| Constructor and Description |
|---|
HurlBodyWriter(OutputStream outputStream) |
| 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.
|
writeStreampublic HurlBodyWriter(OutputStream outputStream)
public void write(byte[] bytes)
throws IOException
BodyWriterwrite in class BodyWriterbytes - array with the bytes to writeIOException - if an error occurs while writingpublic void write(byte[] bytes,
int lengthToWriteFromStart)
throws IOException
BodyWriterwrite in class BodyWriterbytes - array with the bytes to writelengthToWriteFromStart - how many bytes to write, starting from the first one in
the arrayIOException - if an error occurs while writingpublic void flush()
throws IOException
BodyWriterflush in class BodyWriterIOException - if an error occurs while flushing the buffer