Code example for ByteBuffer

Methods: rewind

0
     * {@inheritDoc} 
     * 
     * @since 4.2 
     */ 
    public void close() { 
        this.buf.rewind();
    } 
 
    /** 
     * {@inheritDoc} 
     * 
     * @deprecated (4.2) use {@link #close()} 
     */ 
    @Deprecated 
    public void finish() { 
        close(); 
    } 
 
    public void produceContent(final ContentEncoder encoder, final IOControl ioctrl)
            throws IOException { 
        encoder.write(this.buf);