John, This is really a simple Java issue. When you say that it is not a file you are correct. It is just a java.lang.btye[]. But on the other hand a java.io.File is not a file either. It is just a pointer to the actual files in your filesystem. If you want to write the byte[] out to a new file on your filesystem just use simple file io. Something like ...... OutputStream out = new FileOutpuStream(new File(<file_name_goes_here>)); byte[] bytes = new byte[1024]; int bytesRead; while ((bytesRead = in.read(bytes)) != -1) { out.write(bytes, 0, bytesRead); } out.close(); Nathan On Aug 16, 2005, at 4:10 AM, John Li wrote:
|