dcsimg
Output file format
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   RIchard_Ankrum
Posted On:   Wednesday, March 10, 2004 11:49 AM

I need to output binary data into a file to be used by another program. When I try to create it using the ObjectOutputStream class, the data fields follow a six byte header. I need to create the file without the header block. How can I do this?

Re: Output file format

Posted By:   David_Thornton  
Posted On:   Wednesday, March 10, 2004 09:04 PM

You should be using FileOutputStream which, to quote the API docs, "is meant for writing streams of raw bytes such as image data".



There is a list of all of the java.io streams with a description of what they do in the Java Tutorial at;


http://java.sun.com/docs/books/tutorial/essential/io/datasinks.html

Re: Output file format

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, March 10, 2004 02:24 PM

Sounds like you don't want to use ObjectOutputStream, if you don't want the object header

About | Sitemap | Contact