Package org.robolectric.shadows
Class ShadowBluetoothSocket
- java.lang.Object
-
- org.robolectric.shadows.ShadowBluetoothSocket
-
@Implements(android.bluetooth.BluetoothSocket.class) public class ShadowBluetoothSocket extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ShadowBluetoothSocket()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclose()protected voidconnect()This method doesn't perform an actual connection and returns immediatelyprotected java.io.InputStreamgetInputStream()java.io.PipedOutputStreamgetInputStreamFeeder()ReturnsPipedOutputStreamthat controls input stream of theBluetoothSocket.protected java.io.OutputStreamgetOutputStream()java.io.PipedInputStreamgetOutputStreamSink()ReturnsPipedInputStreamthat controls output stream of theBluetoothSocket.protected booleanisConnected()voidsetOutputStream(java.io.PipedOutputStream outputStream)Set the output stream.
-
-
-
Method Detail
-
setOutputStream
public void setOutputStream(java.io.PipedOutputStream outputStream)
Set the output stream.write()operations on this stream can be observed to verify expected behavior.
-
getInputStreamFeeder
public java.io.PipedOutputStream getInputStreamFeeder()
ReturnsPipedOutputStreamthat controls input stream of theBluetoothSocket.
-
getOutputStreamSink
public java.io.PipedInputStream getOutputStreamSink()
ReturnsPipedInputStreamthat controls output stream of theBluetoothSocket.
-
getInputStream
@Implementation protected java.io.InputStream getInputStream()
-
getOutputStream
@Implementation protected java.io.OutputStream getOutputStream()
-
isConnected
@Implementation protected boolean isConnected()
-
connect
@Implementation protected void connect() throws java.io.IOExceptionThis method doesn't perform an actual connection and returns immediately- Throws:
java.io.IOException
-
close
@Implementation protected void close() throws java.io.IOException- Throws:
java.io.IOException
-
-