copy Bytes class from elasticsearch 0.90.0