Interface ContentOutputBuffer

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      void flush()
      Deprecated.
      (4.2) No longer used.
      int produceContent​(ContentEncoder encoder)
      Deprecated.
      (4.3) use implementation specific methods.
      void reset()
      Resets the buffer by clearing its state and stored content.
      void write​(byte[] b, int off, int len)
      Writes len bytes from the specified byte array starting at offset off to this buffer.
      void write​(int b)
      Writes the specified byte to this buffer.
      void writeCompleted()
      Indicates the content has been fully written.
    • Method Detail

      • produceContent

        @Deprecated
        int produceContent​(ContentEncoder encoder)
                    throws java.io.IOException
        Deprecated.
        (4.3) use implementation specific methods.
        Writes content from this buffer to the given ContentEncoder.
        Parameters:
        encoder - content encoder.
        Returns:
        number of bytes written.
        Throws:
        java.io.IOException - in case of an I/O error.
      • reset

        void reset()
        Resets the buffer by clearing its state and stored content.
      • flush

        @Deprecated
        void flush()
            throws java.io.IOException
        Deprecated.
        (4.2) No longer used.
        Throws:
        java.io.IOException
      • write

        void write​(byte[] b,
                   int off,
                   int len)
            throws java.io.IOException
        Writes len bytes from the specified byte array starting at offset off to this buffer.

        If off is negative, or len is negative, or off+len is greater than the length of the array b, this method can throw a runtime exception. The exact type of runtime exception thrown by this method depends on implementation.

        Parameters:
        b - the data.
        off - the start offset in the data.
        len - the number of bytes to write.
        Throws:
        java.io.IOException - if an I/O error occurs.
      • write

        void write​(int b)
            throws java.io.IOException
        Writes the specified byte to this buffer.
        Parameters:
        b - the byte.
        Throws:
        java.io.IOException - if an I/O error occurs.
      • writeCompleted

        void writeCompleted()
                     throws java.io.IOException
        Indicates the content has been fully written.
        Throws:
        java.io.IOException - if an I/O error occurs.