You could probably pass around DataOutputStreams instead of having to do the intToBytes stuff here, though it's not a major issue