java.io.FileOutputStream misbehavior
From: witichis (gwitichis_at_hotmail.com)
Date: 02/06/04
- Next message: Max: "Log5j e Jboss 3.2.3"
- Previous message: James: "Options when creating images"
- Next in thread: Dale King: "Re: java.io.FileOutputStream misbehavior"
- Reply: Dale King: "Re: java.io.FileOutputStream misbehavior"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 6 Feb 2004 02:24:06 -0800
Hello,
is it right that when writing a file, java.io.FileOutputStream decides
if
one or two byte get written per char?
For example you save a String with about 40kbyte into a file.
The size on disk is 40k.
When putting a single umlaut in the String, the filesize doubles
because
sun jre 1.4.2-b28 is writing unicode (two bytes per character) into
the file. Plus "FFFE" as file preamble.
How can this behavior be avoided and let the Stream always write
single bytes per char?
regs
Witi
- Next message: Max: "Log5j e Jboss 3.2.3"
- Previous message: James: "Options when creating images"
- Next in thread: Dale King: "Re: java.io.FileOutputStream misbehavior"
- Reply: Dale King: "Re: java.io.FileOutputStream misbehavior"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|