存放数据到文件出现乱码~~求解

File f = new File("e:\\网站游览统计录.txt");
FileOutputStream fos = new FileOutputStream(f);
BufferedOutputStream bos = new BufferedOutputStream(fos);
DataOutputStream dos = new DataOutputStream(bos);
byte a = nub.byteValue();
dos.writeByte(a);
bos.close();

txt文件的数据为什么是乱码 我使用的编码file.encoding=GB18030

[351 byte] By [marol1210] at [2008-3-14]
# 1
不确定哪的问题,使用writeUTF()吧
yanhan0615-炮炮 at 2007-10-21 > top of Msdn China Tech,Java,J2ME...
# 2
无奈之下 我是用了UTF 但是文件开头部分有空格 因为使用了UTF
marol1210 at 2007-10-21 > top of Msdn China Tech,Java,J2ME...