public final class DefaultHttpData extends AbstractHttpData
HttpData implementation.EMPTY_DATA| Constructor and Description |
|---|
DefaultHttpData(byte[] data,
boolean endOfStream)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
array()
Returns the underlying byte array of this data.
|
protected byte |
getByte(int index)
Gets the
byte value at the given index. |
boolean |
isEndOfStream()
Tells whether the stream should be ended when writing this object.
|
int |
length()
Returns the length of this data.
|
String |
toString() |
equals, hashCodepublic DefaultHttpData(byte[] data,
boolean endOfStream)
public byte[] array()
HttpDatapublic int length()
HttpDatapublic boolean isEndOfStream()
HttpObjectHttpHeaders-only responses or to more efficiently close the stream along with the last piece of
HttpData. This only has meaning for HttpObject writers, not readers.protected byte getByte(int index)
AbstractHttpDatabyte value at the given index.getByte in class AbstractHttpDataCopyright © 2020 LeanCloud. All rights reserved.