Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2008

Tip: Looking for answers? Try searching our database.

Writing a outlook msg file using java

Thread view: 
Mradul - 12 Jan 2008 13:20 GMT
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
Jason.Herald@gmail.com - 12 Jan 2008 19:47 GMT
> Hi,
> I am writing a code that reads data (in bytes) from URL stream and
[quoted text clipped - 7 lines]
> Thanks and Regards,
> Mradul

See if this helps: http://www.exampledepot.com/egs/java.nio.charset/ConvertChar.html
Lew - 12 Jan 2008 20:09 GMT
>> Hi,
>> I am writing a code that reads data (in bytes) from URL stream and
[quoted text clipped - 9 lines]
>
> See if this helps: http://www.exampledepot.com/egs/java.nio.charset/ConvertChar.html

Or how about using Readers and Writers instead of Streams, since the former
are encoding-aware?

Signature

Lew

Roedy Green - 12 Jan 2008 21:06 GMT
On Sat, 12 Jan 2008 05:20:45 -0800 (PST), Mradul
<mradul.kaushik@gmail.com> wrote, quoted or indirectly quoted someone
who said :

>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.
Signature

Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com

Lars Enderin - 12 Jan 2008 21:21 GMT
Roedy Green skrev:

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

I get a 404 with that URL.
Roedy Green - 13 Jan 2008 08:44 GMT
On Sat, 12 Jan 2008 21:21:58 GMT, Lars Enderin
<lars.enderin@gmail.com> wrote, quoted or indirectly quoted someone
who said :

>http://mindprod.com/jgloss/applet/encodingrecogniser.html
>>
>I get a 404 with that URL.

that should read
http://mindprod.com/applet/encodingrecogniser.html
Signature

Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com

Mradul - 13 Jan 2008 20:28 GMT
On Jan 13, 2:06 am, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> On Sat, 12 Jan 2008 05:20:45 -0800 (PST), Mradul
> <mradul.kaus...@gmail.com> wrote, quoted or indirectly quoted someone
[quoted text clipped - 27 lines]
> Roedy Green, Canadian Mind Products
> The Java Glossary,http://mindprod.com

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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.