try {
URL u = new URL("http://www.amnesty.org/");
HttpURLConnection huc = (HttpURLConnection) u.openConnection();
huc.setRequestMethod("PUT");
huc.connect();
OutputStream os = huc.getOutputStream();
int code = huc.getResponseCode();
if (code >= 200 && < 300) {
// put the data...
}
huc.disconnect();
}
catch (IOException e) { //...