Package com.ngrok.net

Class ConnectionOutputStream

    • Constructor Detail

      • ConnectionOutputStream

        public ConnectionOutputStream​(Connection connection,
                                      int bufferSize)
        Creates a new output stream for the given connection, backed by a direct buffer with the specified buffer size.
        Parameters:
        connection - the connection to write to
        bufferSize - the size of the buffer to use to write data to the connection
    • Method Detail

      • write

        public void write​(int b)
                   throws IOException
        Writes a single byte of data to the output stream.
        Specified by:
        write in class OutputStream
        Parameters:
        b - the byte to write
        Throws:
        IOException - if an I/O error occurs
      • write

        public void write​(byte[] b,
                          int off,
                          int len)
                   throws IOException
        Writes bytes from the specified byte array starting at offset off to the output stream.
        Overrides:
        write in class OutputStream
        Parameters:
        b - the array of bytes to write
        off - the offset within the buffer to start writing from
        len - the number of bytes to write
        Throws:
        IOException - if an I/O error occurs