public byte [ ] getGravatarForEmail ( String emailAddressParam , int sizeParam ) { try { JSONObject gravatarJSONObj = this . getJson ( WS . Path . User . Version1 . getGravatarByEmail ( emailAddressParam , sizeParam ) ) ; String base64Text = gravatarJSONObj . optString ( JSON_TAG_DATA , "" ) ; if ( base64Text == null || base64Text . isEmpty ( ) ) { return null ; } return UtilGlobal . decodeBase64 ( base64Text ) ; } //JSON Parsing... catch ( JSONException jsonExcept ) { throw new FluidClientException ( jsonExcept . getMessage ( ) , jsonExcept , FluidClientException . ErrorCode . JSON_PARSING ) ; } //Encoding not supported... catch ( UnsupportedEncodingException unsEncExcept ) { throw new FluidClientException ( unsEncExcept . getMessage ( ) , unsEncExcept , FluidClientException . ErrorCode . IO_ERROR ) ; } }
Retrieve the gravatar bytes by email .