public static Content content ( String somePlainText ) { Content c = null ; try { c = new Content ( "text/plain; charset=UTF-8" , somePlainText . getBytes ( "UTF-8" ) ) ; } catch ( UnsupportedEncodingException e ) { /* UTF-8 is never unsupported */ } return c ; }
Create a content object from plain text . Use this to POST the content to a URL .