Class ShadowBluetoothSocket


  • @Implements(android.bluetooth.BluetoothSocket.class)
    public class ShadowBluetoothSocket
    extends java.lang.Object
    • 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 immediately
      protected java.io.InputStream getInputStream()  
      java.io.PipedOutputStream getInputStreamFeeder()
      Returns PipedOutputStream that controls input stream of the BluetoothSocket.
      protected java.io.OutputStream getOutputStream()  
      java.io.PipedInputStream getOutputStreamSink()
      Returns PipedInputStream that controls output stream of the BluetoothSocket.
      protected boolean isConnected()  
      void setOutputStream​(java.io.PipedOutputStream outputStream)
      Set the output stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShadowBluetoothSocket

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

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