Added getData(int index) and writeData().