Code example for ByteBuffer

Methods: capacity

0
 
            /* ********************************************************* 
             * Work around Android 4 bug: 
             * http://code.google.com/p/android/issues/detail?id=24327  
             */ 
            ByteBuffer input = ByteBuffer.allocate(dataIn.capacity());
            input.put(dataIn);
            input.rewind();
            /* ******************************************************* */ 
 
            m_encryptCipher.doFinal(input, dataOut);
 
            return true; 
        }catch(Exception exc)
        { 
            Logger.E(TAG, exc);
            return false; 
        } 
    }