I actually just realized what that buffer was being used for. I was using it for debugging, there was no permanent use for it. I was getting a thrift error when I had made the changes, so what I did was made that temporary buffer to see what was stored in the contents of the buffer and compared it against what I was supposed to be seeing by reverting back to the old code and inserting the same debugging hack. It was just a stupid way to get around not being able to see the bytes in the buffer within the debugging environment, before thift tried reading them and threw an exception. That also explains why I re-created the buffer at the beginning, because once the bytes were read into my debugging buffer they were not able to be re-read out of the buffer by thrift, as there is no seek-backwards method for that type of stream.
This is more than needed to be said, because jacques fixed it, but we were looking at the code together and I couldn't remember for the life of me why it was there.
I will create a modified patch with only the related changes.