Represents a stream of data.
Public Method Summary
InputStream |
asInputStream()
Gets the
InputStream
from which to read the data for this Stream.
|
ParcelFileDescriptor |
asParcelFileDescriptor()
Gets the
ParcelFileDescriptor
from which to read the data for this Stream.
|
void |
close()
This method is deprecated. Use
Payload.close() instead.
|
Inherited Method Summary
Public Methods
publicInputStream asInputStream()
Gets theInputStream
from which to read the data for this Stream.
When receiving aPayload
of typePayload.Type.STREAM
,
Nearby Connections will continuously write the incoming streamed data to this
InputStream; when no more data is available (likely because the sending device stopped
streaming data), this InputStream will be closed.
publicParcelFileDescriptor asParcelFileDescriptor()
Gets theParcelFileDescriptor
from which to read the data for this Stream.
When receiving aPayload
of typePayload.Type.STREAM
,
Nearby Connections will continuously write the incoming streamed data to this
ParcelFileDescriptor; when no more data is available (likely because the sending device
stopped streaming data), this ParcelFileDescriptor will be closed.
public voidclose()
This method is deprecated.
UsePayload.close()
instead.
Closes theParcelFileDescriptor
andInputStream
to
release resource.