Java: unwanted characters at the beginning of a text file
Posted
by Patrick
on Stack Overflow
See other posts from Stack Overflow
or by Patrick
Published on 2010-05-10T08:33:09Z
Indexed on
2010/05/10
8:44 UTC
Read the original article
Hit count: 161
java
hi,
when I write a new text file in Java, I get these characters at the beginning of the file:
¨Ìt
This is the code:
public static void writeMAP(String filename, Object object) throws IOException {
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(filename));
oos.writeObject(object);
oos.close();
}
thanks
© Stack Overflow or respective owner