Added function pointer for custom buffer EOF reader.