private int findClosestChunk(int chunkSize){
  int x=1;
  for (; x <= chunkSize; x=x * 2)   ;
  return x;
}

private int findClosestChunk ( int chunkSize ) { int x = 1 ; for ( ; x <= chunkSize ; x = x * 2 ) ; return x ; }
returns closest ( bigger ) valid chunk size to the given one . valid is the one that is the power of two .
