aspose file tools*
The moose likes I/O and Streams and the fly likes BufferedOutputStream not working for image and *.exe files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "BufferedOutputStream not working for image and *.exe files" Watch "BufferedOutputStream not working for image and *.exe files" New topic
Author

BufferedOutputStream not working for image and *.exe files

saravanan palanivel
Greenhorn

Joined: Sep 05, 2012
Posts: 9
Hi,
I am using BufferedOutputStream for file upload and download in windows. It works fine for writing files to targeted folder with same size, but the problem is *.exe files and image files like *.png,*.jpg are not opening. What method I should use to overcome this issue..
please help me ...
Kemal Sokolovic
Bartender

Joined: Jun 19, 2010
Posts: 825
    
    5

Check ImageWriter and ImageOutputStream from API, for saving images.


The quieter you are, the more you are able to hear.
saravanan palanivel
Greenhorn

Joined: Sep 05, 2012
Posts: 9
Hi Kemal,
Will it work for *.txt,*.pdf,*.xls,and *.sitx and other file format?
please..
Kemal Sokolovic
Bartender

Joined: Jun 19, 2010
Posts: 825
    
    5

saravanan palanivel wrote:Hi Kemal,
Will it work for *.txt,*.pdf,*.xls,and *.sitx and other file format?
please..


No, these are for images.
To write to txt you can use FileWriter + BufferedWriter. I think that for pdf and xls you'll need to find some third party libraries that support writing in these formats.
saravanan palanivel
Greenhorn

Joined: Sep 05, 2012
Posts: 9
Kemal,
Thank you very much for your quick response..!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: BufferedOutputStream not working for image and *.exe files
 
Similar Threads
Can Applet thorugh RMI invoke files on remote m/c?How??
Tomcat: Starting It Up
Copying a Binary (EXE) file
how to decrease the size of the jpeg image file?
SQL Server image datatype