class NIO::ByteBuffer

def clear

Clear the buffer, resetting it to the default state
def clear
  @buffer   = ("\0" * @capacity).force_encoding(Encoding::BINARY)
  @position = 0
  @limit    = @capacity
  @mark     = nil
  self
end