org.sakaiproject.entitybroker.util.http
Class LazyResponseOutputStream
java.lang.Object
java.io.OutputStream
org.sakaiproject.entitybroker.util.http.LazyResponseOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class LazyResponseOutputStream
- extends OutputStream
This will get the response to get an outputstream from but will not actually get it from the response
until someone attempts to use the outputstream
This is horrible but required because of the way Sakai tool forwarding works
- Author:
- Aaron Zeckoski (azeckoski @ gmail.com)
LazyResponseOutputStream
public LazyResponseOutputStream(javax.servlet.http.HttpServletResponse response)
- Parameters:
response - the response that will be used to get the outputstream,
this will die if someone has tried to get the writer out of this
write
public void write(byte[] b)
throws IOException
- Overrides:
write in class OutputStream
- Throws:
IOException
write
public void write(byte[] b,
int off,
int len)
throws IOException
- Overrides:
write in class OutputStream
- Throws:
IOException
write
public void write(int b)
throws IOException
- Specified by:
write in class OutputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class OutputStream
- Throws:
IOException
flush
public void flush()
throws IOException
- Specified by:
flush in interface Flushable- Overrides:
flush in class OutputStream
- Throws:
IOException
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2007-2012 CARET, University of Cambridge. All Rights Reserved.