Package com.google.api.client.util
Class ByteArrayStreamingContent
java.lang.Object
com.google.api.client.util.ByteArrayStreamingContent
- All Implemented Interfaces:
StreamingContent
Deprecated.
use com.google.common.io.ByteSource
Streaming content whose source is a byte array.
Implementation is not thread-safe.
- Since:
- 1.14
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionByteArrayStreamingContent
(byte[] byteArray) Deprecated.ByteArrayStreamingContent
(byte[] byteArray, int offset, int length) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
writeTo
(OutputStream out) Deprecated.Writes the byte content to the given output stream.
-
Field Details
-
byteArray
private final byte[] byteArrayDeprecated.Byte array content. -
offset
private final int offsetDeprecated.Starting offset into the byte array. -
length
private final int lengthDeprecated.Length of bytes to read from byte array.
-
-
Constructor Details
-
ByteArrayStreamingContent
public ByteArrayStreamingContent(byte[] byteArray) Deprecated.- Parameters:
byteArray
- byte array content
-
ByteArrayStreamingContent
public ByteArrayStreamingContent(byte[] byteArray, int offset, int length) Deprecated.- Parameters:
byteArray
- byte array contentoffset
- starting offset into the byte arraylength
- of bytes to read from byte array
-
-
Method Details
-
writeTo
Deprecated.Description copied from interface:StreamingContent
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.
- Specified by:
writeTo
in interfaceStreamingContent
- Parameters:
out
- output stream- Throws:
IOException
-