Sadly there is no insert and indeed the put overwrites the bytes.

The charset.encode(...) gives me a ByteBuffer that I cannot retrieve 
'empty'...

Adding (put) the BOM first should be ok, but then adding all the test-bytes 
will not work. Then again I have to loop over all the bytes...

Op vrijdag 30 maart 2012 10:34:20 UTC+2 schreef Remote Red het volgende:
>
> > .put(0, (byte) 0xEF) 
> > .put(1, (byte) 0xBB) 
> > .put(2, (byte) 0xBF) 
>
> > However when the file is created and I open it with either notepad++ or 
> > excel the first characters are  not show, the file always starts with * 
> > artdate"* . 
> > 
> > Any idea how to work around this? 
>
> You are using put(). Those three statements will overwrite the 
> first three bytes. 
>
> Isn't there an insert() ? 
>
> If not: just first write the bom and then the bytes.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to