Tabs and spaces.
This commit is contained in:
parent
b01e0c8cdc
commit
05f3ced64f
33 changed files with 306 additions and 306 deletions
|
|
@ -8,12 +8,12 @@ public class BoundInputStream extends InputStream {
|
|||
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||
private InputStream base;
|
||||
private long bound;
|
||||
|
||||
|
||||
public BoundInputStream(InputStream base, long bound) {
|
||||
this.base = base;
|
||||
this.bound = bound;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int read() throws IOException {
|
||||
if (bound <= 0) return -1;
|
||||
|
|
@ -22,17 +22,17 @@ public class BoundInputStream extends InputStream {
|
|||
bound--;
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int available() throws IOException {
|
||||
return (int)Math.min(base.available(), bound);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean markSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
if (bound <= 0) return -1;
|
||||
|
|
@ -41,19 +41,19 @@ public class BoundInputStream extends InputStream {
|
|||
bound -= r;
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int read(byte[] b) throws IOException {
|
||||
return read(b, 0, b.length);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public long skip(long n) throws IOException {
|
||||
long r = base.skip(Math.min(bound, n));
|
||||
bound -= r;
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
base.close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue