Add a method to get a byte buffer