Code example for CharBuffer

Methods: arrayOffset, hasArray, position

0
    private final void setPosition(CharBuffer out){
        if(out.hasArray()){
            out.position(out.position() + data[OUTPUT_OFFSET]);
        }else{ 
            out.put(output,0,data[OUTPUT_OFFSET]);
        } 
        // BEGIN android-added 
        // release reference to output array, which may not be ours 
        output = null;
        // END android-added 
    } 
    private final void setPosition(ByteBuffer in){
 
        // ok was there input held in the previous invocation of decodeLoop  
        // that resulted in output in this invocation? 
        // BEGIN android-changed 
        in.position(in.position() + data[INPUT_OFFSET] + savedInputHeldLen - data[INPUT_HELD]);
        savedInputHeldLen = data[INPUT_HELD];
        // release reference to input array, which may not be ours 
        input = null;
        // END android-changed