Class RepoRemoteInputStream

java.lang.Object
java.io.InputStream
org.alfresco.repo.remote.RepoRemoteInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class RepoRemoteInputStream extends InputStream
A wrapper implementation of InputStream to work with a RepoRemoteTransport instance.
Author:
britt
  • Constructor Details

    • RepoRemoteInputStream

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

    • read

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

      public int read(byte[] b, int off, int len) throws IOException
      Read a buffer of bytes.
      Overrides:
      read in class 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:
      IOException
    • close

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