Writing may not happen immediately if the stream chooses to buffer. If
you want to write these bytes with immediate effect, call {@link commit()}
after calling write().
This method returns the sequence ID of the write (i.e. 1 for first, 2 for
second, etc etc).