public class ByteArrayStreamingContent extends Objectimplements StreamingContent
Implementation is not thread-safe.
| Constructor and Description |
|---|
ByteArrayStreamingContent(byte[] byteArray)
|
ByteArrayStreamingContent(byte[] byteArray, int offset, int length)
|
public ByteArrayStreamingContent(byte[] byteArray)
byteArray - byte array content
public ByteArrayStreamingContent(byte[] byteArray,
int offset,
int length)
byteArray - byte array content
offset - starting offset into the byte array
length - of bytes to read from byte array
public void writeTo(OutputStreamout) throws IOException
StreamingContent
Implementations must not close the output stream, and instead should flush the output stream. Some callers may assume that the the output stream has not been closed, and will fail to work if it has been closed.
writeTo in interface
StreamingContent
out - output stream
IOException