Methods Summary |
---|
public void | close()Close this output stream and the socket associated with it.
mSocket.close();
|
public void | flush()Wait until the data in sending queue is emptied. A polling version
for flush implementation. Use it to ensure the writing data afterwards will
be packed in the new RFCOMM frame.
mSocket.flush();
|
public void | write(int oneByte)Writes a single byte to this stream. Only the least significant byte of
the integer {@code oneByte} is written to the stream.
byte b[] = new byte[1];
b[0] = (byte)oneByte;
mSocket.write(b, 0, 1);
|
public void | write(byte[] b, int offset, int count)Writes {@code count} bytes from the byte array {@code buffer} starting
at position {@code offset} to this stream.
if (b == null) {
throw new NullPointerException("buffer is null");
}
if ((offset | count) < 0 || count > b.length - offset) {
throw new IndexOutOfBoundsException("invalid offset or length");
}
mSocket.write(b, offset, count);
|