protected int offsetVal(String maskString){
  int offset=0;
  for (int i=0; i < maskString.length(); i++) {
    if (maskString.charAt(i) == 'V') {
      offset=maskString.length() - 1 - i;
    }
  }
  return offset;
}

protected int offsetVal ( String maskString ) { int offset = 0 ; for ( int i = 0 ; i < maskString . length ( ) ; i ++ ) { if ( maskString . charAt ( i ) == 'V' ) { offset = maskString . length ( ) - 1 - i ; } } return offset ; }
find number of places to shift a value left to align if with a mask . for example , as mask of " xxvvvxxx " means that the value 5 needs to be shifted left 3 places before being masked and stored as xx101xxx
