Look for Elliptic Curve Point Compression.
In OpenSSL(which follows X9.62 standard), there are functions for this purpose:
- BIGNUM *EC_POINT_point2bn() - convert EC point to bignum
- char *EC_POINT_point2hex() - convert EC point to hex string
And ofcourse, functions to convert it back:
- EC_POINT *EC_POINT_bn2point()
- EC_POINT *EC_POINT_hex2point()
For JAVA, check out the answer of this post.