com.opensymphony.module.sitemesh.filter
Class RoutableServletOutputStream
java.lang.Object
java.io.OutputStream
javax.servlet.ServletOutputStream
com.opensymphony.module.sitemesh.filter.RoutableServletOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class RoutableServletOutputStream
- extends ServletOutputStream
Provides a ServletOutputStream that routes through to another ServletOutputStream, however the destination
can be changed at any point. The destination can be passed in using a factory, so it will not be created
until it's actually needed.
- Version:
- $Revision: 1.1 $
- Author:
- Joe Walnes
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
destination
private ServletOutputStream destination
factory
private RoutableServletOutputStream.DestinationFactory factory
RoutableServletOutputStream
public RoutableServletOutputStream(RoutableServletOutputStream.DestinationFactory factory)
getDestination
private ServletOutputStream getDestination()
throws IOException
- Throws:
IOException
updateDestination
public void updateDestination(RoutableServletOutputStream.DestinationFactory factory)
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class OutputStream
- Throws:
IOException
write
public void write(int b)
throws IOException
- Specified by:
write
in class OutputStream
- Throws:
IOException
print
public void print(String s)
throws IOException
- Overrides:
print
in class ServletOutputStream
- Throws:
IOException
print
public void print(boolean b)
throws IOException
- Overrides:
print
in class ServletOutputStream
- Throws:
IOException
print
public void print(char c)
throws IOException
- Overrides:
print
in class ServletOutputStream
- Throws:
IOException
print
public void print(int i)
throws IOException
- Overrides:
print
in class ServletOutputStream
- Throws:
IOException
print
public void print(long l)
throws IOException
- Overrides:
print
in class ServletOutputStream
- Throws:
IOException
print
public void print(float v)
throws IOException
- Overrides:
print
in class ServletOutputStream
- Throws:
IOException
print
public void print(double v)
throws IOException
- Overrides:
print
in class ServletOutputStream
- Throws:
IOException
println
public void println()
throws IOException
- Overrides:
println
in class ServletOutputStream
- Throws:
IOException
println
public void println(String s)
throws IOException
- Overrides:
println
in class ServletOutputStream
- Throws:
IOException
println
public void println(boolean b)
throws IOException
- Overrides:
println
in class ServletOutputStream
- Throws:
IOException
println
public void println(char c)
throws IOException
- Overrides:
println
in class ServletOutputStream
- Throws:
IOException
println
public void println(int i)
throws IOException
- Overrides:
println
in class ServletOutputStream
- Throws:
IOException
println
public void println(long l)
throws IOException
- Overrides:
println
in class ServletOutputStream
- Throws:
IOException
println
public void println(float v)
throws IOException
- Overrides:
println
in class ServletOutputStream
- Throws:
IOException
println
public void println(double v)
throws IOException
- Overrides:
println
in class ServletOutputStream
- Throws:
IOException
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
flush
public void flush()
throws IOException
- Specified by:
flush
in interface Flushable
- Overrides:
flush
in class OutputStream
- Throws:
IOException