Added Write method to classes to write to an integer buffer. And added example output and test.