Package org.robolectric.shadows
Class ShadowBluetoothSocket
java.lang.Object
org.robolectric.shadows.ShadowBluetoothSocket
@Implements(android.bluetooth.BluetoothSocket.class)
public class ShadowBluetoothSocket
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
close()
protected void
connect()
This method doesn't perform an actual connection and returns immediatelyprotected InputStream
ReturnsPipedOutputStream
that controls input stream of theBluetoothSocket
.protected OutputStream
ReturnsPipedInputStream
that controls output stream of theBluetoothSocket
.protected boolean
void
setOutputStream
(PipedOutputStream outputStream) Set the output stream.
-
Constructor Details
-
ShadowBluetoothSocket
public ShadowBluetoothSocket()
-
-
Method Details
-
setOutputStream
Set the output stream.write()
operations on this stream can be observed to verify expected behavior. -
getInputStreamFeeder
ReturnsPipedOutputStream
that controls input stream of theBluetoothSocket
. -
getOutputStreamSink
ReturnsPipedInputStream
that controls output stream of theBluetoothSocket
. -
getInputStream
-
getOutputStream
-
isConnected
-
connect
This method doesn't perform an actual connection and returns immediately- Throws:
IOException
-
close
- Throws:
IOException
-