NearShareStream Interface
public interface NearShareStream
This interface contains methods for reading file data to be transferred through nearby sharing. It is used by the platform during a share operation.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| void |
close()
This method is called when the system is finished transferring files or the operation failed. It should close any internal file streams or channels that were open. |
| void |
read(long offset, int size, ByteBuffer byteBuffer)
Reads the internal file data and writes it to the given **ByteBuffer** reference. |
Method Details
close
public void close()
This method is called when the system is finished transferring files or the operation failed. It should close any internal file streams or channels that were open.
Throws:
read
public void read(long offset, int size, ByteBuffer byteBuffer)
Reads the internal file data and writes it to the given **ByteBuffer** reference.
Parameters: