home *** CD-ROM | disk | FTP | other *** search
- package javax.servlet.http;
-
- import java.io.IOException;
- import javax.servlet.ServletOutputStream;
-
- class NoBodyOutputStream extends ServletOutputStream {
- private int contentLength;
-
- int getContentLength() {
- return this.contentLength;
- }
-
- public void write(int var1) {
- ++this.contentLength;
- }
-
- public void write(byte[] var1, int var2, int var3) throws IOException {
- if (var3 >= 0) {
- this.contentLength += var3;
- } else {
- throw new IOException("negative length");
- }
- }
- }
-