Class ByteArrayServletOutputStream

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

    public class ByteArrayServletOutputStream
    extends ServletOutputStream
    Class that extends ServletOutputStream, used as a wrapper from within SsiInclude
    Author:
    Bip Thelin
    See Also:
    and ByteArrayOutputStream
    • Field Detail

      • buf

        protected final java.io.ByteArrayOutputStream buf
        Our buffer to hold the stream.
    • Constructor Detail

      • ByteArrayServletOutputStream

        public ByteArrayServletOutputStream()
        Construct a new ServletOutputStream.
    • Method Detail

      • toByteArray

        public byte[] toByteArray()
        Returns:
        the byte array.
      • write

        public void write​(int b)
        Write to our buffer.
        Specified by:
        write in class java.io.OutputStream
        Parameters:
        b - The parameter to write
      • isReady

        public boolean isReady()
        TODO SERVLET 3.1
        Specified by:
        isReady in class ServletOutputStream
        Returns:
        true if data can be written, else false