Code example for ByteBuffer

Methods: hasRemaining

0
        close(); 
    } 
 
    public void produceContent(final ContentEncoder encoder, final IOControl ioctrl)
            throws IOException { 
        encoder.write(this.buf);
        if(!this.buf.hasRemaining()) {
            encoder.complete();
        } 
    } 
 
    public long getContentLength() { 
        return this.len;
    } 
 
    public boolean isRepeatable() { 
        return true; 
    } 
 
    public boolean isStreaming() { 
        return false;