Class RepoRemoteOutputStream

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

    public class RepoRemoteOutputStream
    extends java.io.OutputStream
    A wrapper implementation of OutputStream 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 stream.
      void write​(byte[] b)
      Write a buffer of data.
      void write​(byte[] b, int off, int len)
      Write a portion of a block of bytes.
      void write​(int b)
      Write one character.
      • Methods inherited from class java.io.OutputStream

        flush, nullOutputStream
      • Methods inherited from class java.lang.Object

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

      • RepoRemoteOutputStream

        public RepoRemoteOutputStream​(java.lang.String handle,
                                      RepoRemoteTransport remote,
                                      ClientTicketHolder ticketHolder)
        Create a new one.
        Parameters:
        handle - The handle returned from an RepoRemoteTransport call.
        remote - The AVMRemote instance.
    • Method Detail

      • write

        public void write​(int b)
                   throws java.io.IOException
        Write one character.
        Specified by:
        write in class java.io.OutputStream
        Parameters:
        b - The character.
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Close the stream.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.OutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] b,
                          int off,
                          int len)
                   throws java.io.IOException
        Write a portion of a block of bytes.
        Overrides:
        write in class java.io.OutputStream
        Parameters:
        b - The buffer containing the data.
        off - The offset into the buffer.
        len - The number of bytes to write.
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] b)
                   throws java.io.IOException
        Write a buffer of data.
        Overrides:
        write in class java.io.OutputStream
        Parameters:
        b - The buffer.
        Throws:
        java.io.IOException