org.xwiki.portlet.util
Class ByteArrayServletOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by javax.servlet.ServletOutputStream
          extended by org.xwiki.portlet.util.ByteArrayServletOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class ByteArrayServletOutputStream
extends javax.servlet.ServletOutputStream

Class used to write the servlet response in a byte array.

Version:
$Id: 08cef683e9549b06c9f2ebfd90bbbd3bc2e78d1c $

Constructor Summary
ByteArrayServletOutputStream()
           
 
Method Summary
 InputStream toInputStream()
           
 Reader toReader(String encoding)
           
 void write(int b)
           
 
Methods inherited from class javax.servlet.ServletOutputStream
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println
 
Methods inherited from class java.io.OutputStream
close, flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayServletOutputStream

public ByteArrayServletOutputStream()
Method Detail

write

public void write(int b)
           throws IOException
Specified by:
write in class OutputStream
Throws:
IOException

toInputStream

public InputStream toInputStream()
Returns:
an input stream that can be used to access the content written so far in this output stream

toReader

public Reader toReader(String encoding)
                throws UnsupportedEncodingException
Parameters:
encoding - the encoding to be used to read the byte stream
Returns:
a reader that can be used to access the content written so far in this output stream
Throws:
UnsupportedEncodingException - if the specified encoding is not supported


Copyright © 2004-2013 XWiki. All Rights Reserved.