Class ShadowBluetoothSocket

java.lang.Object
org.robolectric.shadows.ShadowBluetoothSocket

@Implements(android.bluetooth.BluetoothSocket.class) public class ShadowBluetoothSocket extends Object
  • Constructor Details

    • ShadowBluetoothSocket

      public ShadowBluetoothSocket()
  • Method Details

    • 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()
      Returns PipedOutputStream that controls input stream of the BluetoothSocket.
    • getOutputStreamSink

      public PipedInputStream getOutputStreamSink()
      Returns PipedInputStream that controls output stream of the BluetoothSocket.
    • 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