Code example for ByteBuffer

Methods: rewind

0
     * allocated buffer space. 
     *  
     * @see java.io.ByteArrayInputStream#count 
     */ 
    public void reset() { 
        buffer.rewind();
    } 
 
    /** 
     * Returns the current size of the buffer. 
     *  
     * @return the value of the <code>count</code> field, which is the number of 
     *         valid bytes in this output stream. 
     * @see java.io.ByteArrayOutputStream#count 
     */ 
    public int size() { 
        return buffer.position();
    } 
 
    /** 
Stop searching for code, let great code find you!  Add Codota to your java IDE