public static HttpEntity newStringEntity ( String s ) { try { return new StringEntity ( s ) ; } catch ( UnsupportedEncodingException e ) { throw new SdkClientException ( "Unable to create HTTP entity: " + e . getMessage ( ) , e ) ; } }
Utility function for creating a new StringEntity and wrapping any errors as a SdkClientException .