i try to write in a file , which is a share file with url , with the help of URLConnection Class and mostly with the OutputStream of connection. So i write my new bodytext for the file and i put it on the stream. But the file doesn't change. Could you give me some hints or code or tutorial for my problem?
my program seems like this
connectionWrite = (HttpURLConnection) new URL(locationFile).openConnection();
connectionWrite.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
connectionWrite.setDoOutput(true);
connectionWrite.setUseCaches(false);
((HttpURLConnection) connectionWrite).setRequestMethod("POST");
connectionWrite.setRequestProperty("Content-Type", "MultiPart/Form-Data");
//connectionWrite.setRequestProperty("Connection", "Keep-Alive");
byte bytes[] = String.valueOf(stamp).getBytes();
connectionWrite.setRequestProperty("Content-length", "" + bytes.length);
connectionWrite.connect();
OutputStream out = connectionWrite.getOutputStream();
out.write(bytes);
out.flush();