class PDF::Reader::Reference

def self.from_buffer (buffer)

instance. Returns nil if the next token isn't an indirect reference.
check if the next token in the buffer is a reference, and return a PDF::Reader::Reference
###############################################################################
def self.from_buffer (buffer)
  buffer.ready_token
  return nil unless m = buffer.raw.match(/^(\d+)\s+(\d+)\s+R\b/)
  buffer.head(m[0].size)
  self.new(m[1].to_i, m[2].to_i)
end