Update of /cvsroot/freenet/freenet/src/freenet/support/servlet
In directory sc8-pr-cvs1:/tmp/cvs-serv25857/src/freenet/support/servlet
Modified Files:
Tag: stable
ServletInputStreamImpl.java
Log Message:
5029: Merge from unstable after months of work. MASSIVE changes.
Highlights:
* Next Generation Routing, massive related changes
* Major changes to handling of messages and connections (PeerHandler and related
changes)
* Even more non-blocking I/O
* Documentation improvements
* Lots of new diagnostics and config options
* Lots of bug fixes and performance tweaking
* Probably lots of new bugs too!
Index: ServletInputStreamImpl.java
===================================================================
RCS file:
/cvsroot/freenet/freenet/src/freenet/support/servlet/ServletInputStreamImpl.java,v
retrieving revision 1.1.1.1.6.1
retrieving revision 1.1.1.1.6.2
diff -u -w -r1.1.1.1.6.1 -r1.1.1.1.6.2
--- ServletInputStreamImpl.java 1 Jul 2003 02:27:17 -0000 1.1.1.1.6.1
+++ ServletInputStreamImpl.java 28 Oct 2003 20:20:46 -0000 1.1.1.1.6.2
@@ -14,43 +14,51 @@
private final InputStream in;
public ServletInputStreamImpl(InputStream in) {
- if(in == null) throw new IllegalArgumentException("in must not be null!");
this.in = in;
}
public final int read() throws IOException {
+ if(in == null) return -1;
return in.read();
}
public final int read(byte[] b) throws IOException {
+ if(in == null) return -1;
return in.read(b, 0, b.length);
}
public final int read(byte[] b, int off, int len) throws IOException {
+ if(in == null) return -1;
return in.read(b, off, len);
}
public final void close() throws IOException {
+ if(in == null) return;
in.close();
}
public final int available() throws IOException {
+ if(in == null) return -1;
return in.available();
}
public final boolean markSupported() {
+ if(in == null) return false;
return in.markSupported();
}
public final void mark(int rl) {
+ if(in == null) return;
in.mark(rl);
}
public final void reset() throws IOException {
+ if(in == null) return;
in.reset();
}
public final void skip(int n) throws IOException {
+ if(in == null) return;
in.skip(n);
}
}
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs