Code example for ListenableFutureTask

Methods: get

0
    @Override 
    public int read() throws IOException {
        if (currentBuffer == null || !currentBuffer.hasRemaining()) {
            if (m_taskIterator.hasNext()) {
                try { 
                    currentBuffer = m_taskIterator.next().get();
                } catch (Exception e) {
                    throw new IOException(e);
                } 
            } else { 
                return -1; 
            } 
        } 
        assert(currentBuffer.hasRemaining());
        return currentBuffer.get();
    } 
 
    @Override 
    public int read(byte b[], int off, int len) throws IOException {
        if (b == null) {
Stop searching for code, let great code find you!  Add Codota to your java IDE