Class LazyResponseOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.sakaiproject.entitybroker.util.http.LazyResponseOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
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)
-
-
Constructor Summary
Constructors Constructor Description LazyResponseOutputStream(HttpServletResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanequals(Object obj)voidflush()inthashCode()StringtoString()voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
LazyResponseOutputStream
public LazyResponseOutputStream(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
-
-
Method Detail
-
write
public void write(byte[] b) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(int b) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
-