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
Constructors Constructor Description ShadowBluetoothSocket()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
close()
protected void
connect()
This method doesn't perform an actual connection and returns immediatelyprotected InputStream
getInputStream()
PipedOutputStream
getInputStreamFeeder()
ReturnsPipedOutputStream
that controls input stream of theBluetoothSocket
.protected OutputStream
getOutputStream()
PipedInputStream
getOutputStreamSink()
ReturnsPipedInputStream
that controls output stream of theBluetoothSocket
.protected boolean
isConnected()
void
setOutputStream(PipedOutputStream outputStream)
Set the output stream.
-
-
-
Method Detail
-
setOutputStream
public void setOutputStream(PipedOutputStream outputStream)
Set the output stream.write()
operations on this stream can be observed to verify expected behavior.
-
getInputStreamFeeder
public PipedOutputStream getInputStreamFeeder()
ReturnsPipedOutputStream
that controls input stream of theBluetoothSocket
.
-
getOutputStreamSink
public PipedInputStream getOutputStreamSink()
ReturnsPipedInputStream
that controls output stream of theBluetoothSocket
.
-
getInputStream
@Implementation protected InputStream getInputStream()
-
getOutputStream
@Implementation protected OutputStream getOutputStream()
-
isConnected
@Implementation protected boolean isConnected()
-
connect
@Implementation protected void connect() throws IOException
This method doesn't perform an actual connection and returns immediately- Throws:
IOException
-
close
@Implementation protected void close() throws IOException
- Throws:
IOException
-
-