/** * Gets to the next chunk if we are done with the current one. * @return */ private boolean fetch() { if (current == null) { throw new IllegalStateException("Stream already closed"); } while(offset==len) { while(!part.parsed && current.next == null) { part.msg.makeProgress(); } current = current.next; if (current == null) { return false; } adjustInMemoryUsage(); this.offset = 0; this.buf = current.data.read(); this.len = current.data.size(); } return true; }
/** * Gets to the next chunk if we are done with the current one. * @return true if any data available * @throws IOException when i/o error */ private boolean fetch() throws IOException { if (closed) { throw new IOException("Stream already closed"); } if (current == null) { return false; } while(offset==len) { while(!part.parsed && current.next == null) { part.msg.makeProgress(); } current = current.next; if (current == null) { return false; } adjustInMemoryUsage(); this.offset = 0; this.buf = current.data.read(); this.len = current.data.size(); } return true; }
/** * Gets to the next chunk if we are done with the current one. * @return true if any data available * @throws IOException when i/o error */ private boolean fetch() throws IOException { if (closed) { throw new IOException("Stream already closed"); } if (current == null) { return false; } while(offset==len) { while(!part.parsed && current.next == null) { part.msg.makeProgress(); } current = current.next; if (current == null) { return false; } adjustInMemoryUsage(); this.offset = 0; this.buf = current.data.read(); this.len = current.data.size(); } return true; }
/** * Gets to the next chunk if we are done with the current one. * @return true if any data available * @throws IOException when i/o error */ private boolean fetch() throws IOException { if (closed) { throw new IOException("Stream already closed"); } if (current == null) { return false; } while(offset==len) { while(!part.parsed && current.next == null) { part.msg.makeProgress(); } current = current.next; if (current == null) { return false; } adjustInMemoryUsage(); this.offset = 0; this.buf = current.data.read(); this.len = current.data.size(); } return true; }