summaryrefslogtreecommitdiffstats
path: root/core/java/android/bluetooth/BluetoothOutputStream.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/bluetooth/BluetoothOutputStream.java')
-rw-r--r--core/java/android/bluetooth/BluetoothOutputStream.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/bluetooth/BluetoothOutputStream.java b/core/java/android/bluetooth/BluetoothOutputStream.java
index 62242a2..117dd47 100644
--- a/core/java/android/bluetooth/BluetoothOutputStream.java
+++ b/core/java/android/bluetooth/BluetoothOutputStream.java
@@ -84,4 +84,15 @@ import java.io.OutputStream;
}
mSocket.write(b, offset, count);
}
+ /**
+ * 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.
+ * @throws IOException
+ * if an i/o error occurs.
+ * @since Android 4.2.3
+ */
+ public void flush() throws IOException {
+ mSocket.flush();
+ }
}