StreamOutput#writePrimitiveLongArray() is private. I have opened https://github.com/elasticsearch/dev/issues/119 to make primitive read/write operations on arrays public.