title: how to delete file from ftp server using java?
body: <p>How can I delete a file from an ftp server using a java program?
  I am successfully able to upload files on the ftp using the following code:</p>
  
  <pre><code>public static void main(String[] args) throws IOException {
      // TODO Auto-generated method stub
      String s = "ftp://username:password@ftpclient:21/text.txt;type=i";
      URL u = new URL(s);
      URLConnection uc = u.openConnection();
      BufferedOutputStream bos = new BufferedOutputStream(uc.getOutputStream());
      bos.write(67);
      bos.close();
      System.out.println("Done");
  }
  </code></pre>
  
  <p>But how do i delete files from this ftp server?
  Any help will be greatly appreciated.........
  Thanks in advance</p>