Package ej.hoka.io

Class IdentityMessageBodyOutputStream

    • Method Detail

      • close

        public final void close()
                         throws IOException
        Closes this output stream and flushes the underlying OutputStream . This method DOES NOT close the underlying stream (i.e. the TCP connection stream). It is the responsibility of the caller to close the underlying stream.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Overrides:
        close in class OutputStream
        Throws:
        IOException - when an I/O error occurs while closing the stream
      • write

        public final void write​(byte[] b)
                         throws IOException
        Writes the content of the byte array to the underlying output stream.
        Overrides:
        write in class OutputStream
        Parameters:
        b - the byte array to read bytes from and write to the underlying output stream.
        Throws:
        IOException - if this output stream has already been closed.
        See Also:
        OutputStream.write(byte[], int, int)
      • write

        public final void write​(byte[] b,
                                int off,
                                int len)
                         throws IOException
        Writes len bytes from the specified byte array starting at offset off to this output stream. The general contract for write(b, off, len) is that some of the bytes in the array b are written to the output stream in order; element b[off] is the first byte written and b[off+len-1] is the last byte written by this operation. If b is null, a NullPointerException is thrown. If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown.
        Overrides:
        write in class OutputStream
        Parameters:
        b - the byte array to read bytes from
        off - the starting index in byte array b to read bytes from
        len - number of bytes to read from the byte array b
        Throws:
        IOException - if this output stream has already been closed
      • write

        public final void write​(int b)
                         throws IOException
        Writes the specified byte to this output stream. The general contract for write is that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.
        Specified by:
        write in class OutputStream
        Parameters:
        b - the value to be written to the underlying output stream
        Throws:
        IOException - if this output stream has already been closed