Package 

Class AdbStream

  • All Implemented Interfaces:
    java.io.Closeable , java.lang.AutoCloseable

    
    public class AdbStream
     implements Closeable
                        

    This class abstracts the underlying ADB streams

    • Method Summary

      Modifier and Type Method Description
      AdbInputStream openInputStream()
      AdbOutputStream openOutputStream()
      int read(Array<byte> bytes, int offset, int length) Read bytes from the ADB daemon.
      void write(Array<byte> bytes, int offset, int length) Sends a WRTE packet with a given byte array payload.
      void flush()
      void close() Closes the stream.
      boolean isClosed() Returns whether the stream is closed or not
      int available() Returns an estimate of available data.
      • Methods inherited from class java.io.Closeable

        close
      • Methods inherited from class java.lang.Object

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

      • read

         int read(Array<byte> bytes, int offset, int length)

        Read bytes from the ADB daemon.

      • write

         void write(Array<byte> bytes, int offset, int length)

        Sends a WRTE packet with a given byte array payload. It does not flush the stream.

        Parameters:
        bytes - Payload in the form of a byte array
      • close

         void close()

        Closes the stream. This sends a close message to the peer.

      • isClosed

         boolean isClosed()

        Returns whether the stream is closed or not

      • available

         int available()

        Returns an estimate of available data.