code: void reset(int count) {
        if (counter != null)
           counter.releaseShared(count);
        available.releaseShared(count);
     }
docs: Resets the buffer counter to the specified number.
  
  @param count
  number of available items in the buffer