public static final int move ( byte [ ] buf , int offset , int length , ByteBuffer bb ) { int count = Math . min ( length , bb . remaining ( ) ) ; bb . put ( buf , offset , count ) ; return count ; }
Moves bytes from buf to bb as much as is possible . Positions are moved according to move .