org.apache.tomcat.facade
Class ServletOutputStreamFacade
java.lang.Object
java.io.OutputStream
javax.servlet.ServletOutputStream
org.apache.tomcat.facade.ServletOutputStreamFacade
- public final class ServletOutputStreamFacade
- extends javax.servlet.ServletOutputStream
Field Summary |
protected boolean |
closed
|
Method Summary |
void |
close()
|
void |
flush()
Will send the buffer to the client. |
void |
print(java.lang.String s)
Alternate implementation for print, using String.getBytes(enc). |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int i)
|
Methods inherited from class javax.servlet.ServletOutputStream |
print, print, print, print, print, print, println, println, println, println, println, println, println, println |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
closed
protected boolean closed
ServletOutputStreamFacade
protected ServletOutputStreamFacade(Response resA)
write
public void write(int i)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(byte[] b)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
print
public void print(java.lang.String s)
throws java.io.IOException
- Alternate implementation for print, using String.getBytes(enc).
It seems to be a bit faster for small strings, but it's 10..20% slower
for larger texts ( nor very large - 5..10k )
That seems to be mostly because of byte b[] - the writer has an
internal ( and fixed ) buffer.
Please use getWriter() if you want to send strings.
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Will send the buffer to the client.
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
Copyright ? 2001 Apache Software Foundation. All Rights Reserved.