Make gid2id accept ByteBuffer