public class ByteArrayStreamingContent implements StreamingContent
Deprecated. use com.google.common.io.ByteSource
Streaming content whose source is a byte array.
Implementation is not thread-safe.
Implements
StreamingContentConstructors
ByteArrayStreamingContent(byte[] byteArray) (deprecated)
public ByteArrayStreamingContent(byte[] byteArray)
Parameter | |
---|---|
Name | Description |
byteArray |
byte[] byte array content |
ByteArrayStreamingContent(byte[] byteArray, int offset, int length) (deprecated)
public ByteArrayStreamingContent(byte[] byteArray, int offset, int length)
Parameters | |
---|---|
Name | Description |
byteArray |
byte[] byte array content |
offset |
int starting offset into the byte array |
length |
int of bytes to read from byte array |
Methods
writeTo(OutputStream out) (deprecated)
public void writeTo(OutputStream out)
Writes the byte content to the given output stream.
Implementations must not close the output stream, and instead should flush the output stream. Some callers may assume that the output stream has not been closed, and will fail to work if it has been closed.
Parameter | |
---|---|
Name | Description |
out |
OutputStream |
Exceptions | |
---|---|
Type | Description |
IOException |