Hi appa,
You can upload the image files by encoding them to base64.
Try the following code in the client program. Also you have got
to decode it in the server before the value is written to the file.
byte arr[] = Files.toByteArray(new File(
"/home/cloudibm2/Desktop/s1_ObjectCreate.png"));
byte encoded1[] = Base64.encodeBase64(arr);
String b64 = new String(encoded1);
String value = org.codehaus.jettison.json.JSONObject.quote(b64);
...
...
String respStr = "{\n";
respStr = respStr + "\"mimetype\" : \"" + "text/plain" + "\",\n";
respStr = respStr + "\"value\" : " + value + "\n";
respStr = respStr + "}\n";