Save as swf file using httpconnection and file io
I have one application which is fatch the swf file from web and i want to save as in same to swf file format.
when i have fatch the swf file and save as .swf format i have unable to view as flash animation in browser and micromedia.
Anyone suggest me ?
#############################################################
URL url = new URL("http://nileshpatel.com/abc.swf");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestProperty( "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" );
BufferedReader rd;
rd = new BufferedReader(new InputStreamReader(con.getInputStream()));
String line="";
String content="";
File f = new File("users/nileshpatel/neo.swf");
FileWriter fw = new FileWriter(f);
while ((line = rd.readLine()) != null) {
content += line;
}
rd.close();
fw.write(content);
fw.close();
############################################################

