@Override public int read() throws IOException { if (done) { return -1; } if (currentSource == null) { readChunk(); if (currentSource == null) { return -1; } } int b = currentSource.read(); if (b == -1) { // read the next chunk currentSource = null; return read(); } return b & 0xFF; }
@Override public int read() throws IOException { if (done) { return -1; } if (currentSource == null) { readChunk(); if (currentSource == null) { return -1; } } int b = currentSource.read(); if (b == -1) { // read the next chunk currentSource = null; return read(); } return b & 0xFF; }