Added functor to allow getting data from outside buffer.