Changed abstract write() scope to protected