Read the buffer and parse it