FileDocCategorySizeDatePackage
BufferedServletOutputStream.javaAPI DocExample1062Sun Sep 02 14:59:04 BST 2001com.oreilly.javaxslt.util

BufferedServletOutputStream

public class BufferedServletOutputStream extends ServletOutputStream
A custom servlet output stream that stores its data in a buffer, rather than sending it directly to the client.
author
Eric M. Burke

Fields Summary
private ByteArrayOutputStream
bos
Constructors Summary
Methods Summary
public byte[]getBuffer()

return
the contents of the buffer.


               
       
        return this.bos.toByteArray();
    
public voidreset()

        this.bos.reset();
    
public voidsetBufferSize(int size)

        // no way to resize an existing ByteArrayOutputStream
        this.bos = new ByteArrayOutputStream(size);
    
public voidwrite(int data)
This method must be defined for custom servlet output streams.

        this.bos.write(data);