private static void copyRemaining(ByteBuffer src,ByteBuffer dst){
  int n=Math.min(src.remaining(),dst.remaining());
  copy(src,dst,n);
}

private static void copyRemaining ( ByteBuffer src , ByteBuffer dst ) { int n = Math . min ( src . remaining ( ) , dst . remaining ( ) ) ; copy ( src , dst , n ) ; }
copies as much as possible
