org.apache.cocoon.caching
Class CachingOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byorg.apache.cocoon.caching.CachingOutputStream

public final class CachingOutputStream
extends OutputStream

This is an OutputStream which forwards all received bytes to another output stream and in addition caches all bytes, thus acting like a TeeOutputStream.

Version:
$Id: CachingOutputStream.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Constructor Summary
CachingOutputStream(OutputStream os)
           
 
Method Summary
 void close()
           
 void flush()
           
 byte[] getContent()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingOutputStream

public CachingOutputStream(OutputStream os)
Method Detail

getContent

public byte[] getContent()

write

public void write(int b)
           throws IOException
Throws:
IOException

write

public void write(byte[] b)
           throws IOException
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Throws:
IOException

flush

public void flush()
           throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.