saner type constants
rename read/writeBuffer to read/writeBytes