home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Professionell 2004 December
/
PCpro_2004_12.ISO
/
files
/
webserver
/
xampp
/
xampp-tomcat-addon-1.4.9-installer.exe
/
servlet-api.jar
/
javax
/
servlet
/
ServletInputStream.class
(
.txt
)
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Java Class File
|
2004-08-28
|
637 b
|
29 lines
package javax.servlet;
import java.io.IOException;
import java.io.InputStream;
public abstract class ServletInputStream extends InputStream {
protected ServletInputStream() {
}
public int readLine(byte[] b, int off, int len) throws IOException {
if (len <= 0) {
return 0;
} else {
int count = 0;
int c;
while((c = this.read()) != -1) {
b[off++] = (byte)c;
++count;
if (c == 10 || count == len) {
break;
}
}
return count > 0 ? count : -1;
}
}
}