Class RepoRemoteInputStream

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

    public class RepoRemoteInputStream
    extends java.io.InputStream
    A wrapper implementation of InputStream to work with a RepoRemoteTransport instance.
    Author:
    britt
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close the underlying AVMRemote handle.
      int read()
      Read in a single byte.
      int read​(byte[] b, int off, int len)
      Read a buffer of bytes.
      • Methods inherited from class java.io.InputStream

        available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

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

      • RepoRemoteInputStream

        public RepoRemoteInputStream​(java.lang.String handle,
                                     RepoRemoteTransport remote,
                                     ClientTicketHolder ticketHolder)
        Construct one.
        Parameters:
        handle - The handle returned by getInputStream();
        remote - The AVMRemote instance.
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Read in a single byte.
        Specified by:
        read in class java.io.InputStream
        Returns:
        The byte as 0-255 or -1 for eof.
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Read a buffer of bytes.
        Overrides:
        read in class java.io.InputStream
        Parameters:
        b - The buffer into which to put the bytes.
        off - The offset into the buffer.
        len - The number of bytes to read.
        Returns:
        The actual number of bytes read or -1 on eof.
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Close the underlying AVMRemote handle.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.InputStream
        Throws:
        java.io.IOException