| Method from java.util.jar.Manifest$FastInputStream Detail: |
public int available() throws IOException {
return (count - pos) + in.available();
}
|
public void close() throws IOException {
if (in != null) {
in.close();
in = null;
buf = null;
}
}
|
public byte peek() throws IOException {
if (pos == count)
fill();
return buf[pos];
}
|
public int read() throws IOException {
if (pos >= count) {
fill();
if (pos >= count) {
return -1;
}
}
return buf[pos++] & 0xff;
}
|
public int read(byte[] b,
int off,
int len) throws IOException {
int avail = count - pos;
if (avail < = 0) {
if (len >= buf.length) {
return in.read(b, off, len);
}
fill();
avail = count - pos;
if (avail < = 0) {
return -1;
}
}
if (len > avail) {
len = avail;
}
System.arraycopy(buf, pos, b, off, len);
pos += len;
return len;
}
|
public int readLine(byte[] b) throws IOException {
return readLine(b, 0, b.length);
}
|
public int readLine(byte[] b,
int off,
int len) throws IOException {
byte[] tbuf = this.buf;
int total = 0;
while (total < len) {
int avail = count - pos;
if (avail < = 0) {
fill();
avail = count - pos;
if (avail < = 0) {
return -1;
}
}
int n = len - total;
if (n > avail) {
n = avail;
}
int tpos = pos;
int maxpos = tpos + n;
while (tpos < maxpos && tbuf[tpos++] != '\n") ;
n = tpos - pos;
System.arraycopy(tbuf, pos, b, off, n);
off += n;
total += n;
pos = tpos;
if (tbuf[tpos-1] == '\n") {
break;
}
}
return total;
}
|
public long skip(long n) throws IOException {
if (n < = 0) {
return 0;
}
long avail = count - pos;
if (avail < = 0) {
return in.skip(n);
}
if (n > avail) {
n = avail;
}
pos += n;
return n;
}
|