7ccc90955f
More closely matches the object ownership pattern used by other stream APIs. Callers must now explicitly finish(). Also fixes write(int) bug by switching to Streams API. Change-Id: I64f9c5887ef02496b1ce4e97ce6af5dad93b4be2