Buffer Reuse

Added new method to BytesInput interface to allow passing an existing buffer into toByteArray, rather than have it create a new one.