public void put ( byte [ ] array , int offset , int length ) { if ( curr == null || curr . remaining ( ) == 0 ) { curr = ringGet ( ) ; bbs . add ( curr ) ; } int len ; while ( length > 0 ) { if ( ( len = curr . remaining ( ) ) > length ) { curr . put ( array , offset , length ) ; length = 0 ; } else { // System.out.println(new String(array)); curr . put ( array , offset , len ) ; length -= len ; offset += len ; curr = ringGet ( ) ; bbs . add ( curr ) ; } } }
Put an array of data into Capacitor