if (available.isEmpty()) {
throw new IllegalStateException();
}
}
DataBuffer first = available.removeFirst();
first.reset(0, 0);
return first;
}
public synchronized void putNextPage(DataBuffer buffer) throws IOException, InterruptedException {
// wait for the current active task