public int size(){
  if (buffer != null)   return buffer.size();
 else   return offsets.size();
}

public int size ( ) { if ( buffer != null ) return buffer . size ( ) ; else return offsets . size ( ) ; }
returns the number of elements .
