title: How to use Java to download a mp3 file online?
body: <p>I used the following method to download an mp3 file at :
  <a href="http://online1.tingclass.com/lesson/shi0529/43/32.mp3" rel="noreferrer">http://online1.tingclass.com/lesson/shi0529/43/32.mp3</a></p>
  
  <p>But I got the following error :</p>
  
  <p>java.io.FileNotFoundException: http:\online1.tingclass.com\lesson\shi0529\43\32.mp3 (The filename, directory name, or volume label syntax is incorrect)</p>
  
  <pre><code>  public static void Copy_File(String From_File,String To_File)
    {   
      try
      {
        FileChannel sourceChannel=new FileInputStream(From_File).getChannel();
        FileChannel destinationChannel=new FileOutputStream(To_File).getChannel();
        sourceChannel.transferTo(0,sourceChannel.size(),destinationChannel);
        // or
        //  destinationChannel.transferFrom(sourceChannel, 0, sourceChannel.size());
        sourceChannel.close();
        destinationChannel.close();
      }
      catch (Exception e) { e.printStackTrace(); }
    }
  </code></pre>
  
  <p>Yet if I do it from a browser by hand, the file is there, I wonder why it didn't work, and what's the right way to do it ?</p>
  
  <p>Frank</p>