title: java rename file before upload
body: <p>I have a problem, <strong>I have source code like this</strong> </p>
  
  <pre><code>public int uploadFile(String sourceFileUri) {
       SharedPreferences myPref = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
      String upLoadServerUri = new String(myPref.getString("serverURL", Constants.URL)+"/upload.php");
      String fileName = picturePath;
  
      HttpURLConnection conn = null;
      DataOutputStream dos = null;  
      String lineEnd = "\r\n";
      String twoHyphens = "--";
      String boundary = "*****";
      int bytesRead, bytesAvailable, bufferSize;
      byte[] buffer;
      int maxBufferSize = 1 * 1024 * 1024; 
      File sourceFile = new File(picturePath);
  </code></pre>
  
  <p>How to rename file on  <em>picturePath</em>  before uploaded.
  Thank You</p>