Writing a outlook msg file using java

M

Mradul

Hi,
I am writing a code that reads data (in bytes) from URL stream and
writes the bytes to a BufferedInputStream (msg file).
When i compare the CONTENT-LENGTH value with the bytes written, i see
some difference in bytes.
After checking on Java forums, i found that the MSG files are encoded
and i need to use a UNICODE decoder. Can you please help me out in
finding one. Please let me know as its kind of urgent.


Thanks and Regards,
Mradul
 
J

Jason.Herald

Hi,
I am writing a code that reads data (in bytes) from URL stream and
writes the bytes to a BufferedInputStream (msg file).
When i compare the CONTENT-LENGTH value with the bytes written, i see
some difference in bytes.
After checking on Java forums, i found that the MSG files are encoded
and i need to use a UNICODE decoder. Can you please help me out in
finding one. Please let me know as its kind of urgent.

Thanks and Regards,
Mradul

See if this helps: http://www.exampledepot.com/egs/java.nio.charset/ConvertChar.html
 
R

Roedy Green

After checking on Java forums, i found that the MSG files are encoded
and i need to use a UNICODE decoder. Can you please help me out in
finding one. Please let me know as its kind of urgent

Java works internally with 16-bit chars. These are usually converted
to 8-bit chars or char-combos externally. There are scores of
possible encodings. Sometimes they are written with 16-bit Unicode
chars, bit or little endian, with or without BOMs.

see http://mindprod.com/jgloss/unicode.html
http://mindprod.com/jgloss/bom.html

You need to identify the one you need to generate. I have written a
little utility to help. See

http://mindprod.com/jgloss/applet/encodingrecogniser.html

You also need some background on encoding.

see http://mindprod.com/jgloss/encoding.html

You also need code to generate and read encoded files. See
http://mindprod.com/applet/fileio.html

Sorry to give you so much reading, but encodings are trickier than you
might first imagine.
 
M

Mradul

Java works internally with 16-bit chars. These are usually converted
to 8-bit chars or char-combos externally. There are scores of
possible encodings. Sometimes they are written with 16-bit Unicode
chars, bit or little endian, with or without BOMs.

seehttp://mindprod.com/jgloss/unicode.htmlhttp://mindprod.com/jgloss/bom.html

You need to identify the one you need to generate. I have written a
little utility to help. See

http://mindprod.com/jgloss/applet/encodingrecogniser.html

You also need some background on encoding.

seehttp://mindprod.com/jgloss/encoding.html

You also need code to generate and read encoded files. Seehttp://mindprod.com/applet/fileio.html

Sorry to give you so much reading, but encodings are trickier than you
might first imagine.

Thanks a lot Roedy for this info. I am just going through the
procedure that you utilized and trying to implement in my scenario and
in case of any problems I will contact you via this thread.
 
Joined
Feb 14, 2008
Messages
1
Reaction score
0
.MSG file using JAVA

Hi

I would like to create a MSG file using JAVA. Can any one please let me know how to do it?

Thanks
Shoba
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,225
Latest member
Top Crypto Podcasts

Latest Threads

Top