public void setInputStreamFrom(InputStream in) throws IOException {
assert(bytes == null);
assert(assertReadyToReadFrom(this, in));
setPhase(READ_PHASE);
this.in = in;
if (optDumpBands) {
// Tap the stream.
bytesForDump = new ByteArrayOutputStream();
this.in = new FilterInputStream(in) {
@Override
public int read() throws IOException {
int ch = in.read();
if (ch >= 0) bytesForDump.write(ch);
return ch;
}
@Override
public int read(byte b[], int off, int len) throws IOException {
int nr = in.read(b, off, len);
if (nr >= 0) bytesForDump.write(b, off, nr);
return nr;
}
};
}
super.readyToDisburse();
}
BandStructure.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:jdk8u-jdk
作者:
评论列表
文章目录