File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Why is it not cafebabe ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Why is it not cafebabe ?" Watch "Why is it not cafebabe ?" New topic
Author

Why is it not cafebabe ?

Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

It was mentioned that the hex bit patterns of the initial parts of java classes translate to cafebabe. When I did a hexdump recently, it gave me:



Why ?
Dragan Stankovic
Ranch Hand

Joined: Oct 14, 2008
Posts: 33
If you coded in machine language you would know

So your dump actually looks like this (it is byte oriented):



Usually, when you do hex dump the memory is displayed in blocks of 16 bits or two bytes where byte with higher bits is displayed first so it seems as they have reversed order.
[ November 10, 2008: Message edited by: Dragan Stankovic ]

http://www.expertaya.com
Bill Shirley
Ranch Hand

Joined: Nov 08, 2007
Posts: 457
Time for some Computer Science 101: Endianness.


Bill Shirley - bshirley - frazerbilt.com
if (Posts < 30) you.read( JavaRanchFAQ);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why is it not cafebabe ?
 
Similar Threads
Cafebabe!
how to stop japplet
Identify whether the string is a actual string or hexadecimal.
While Parsing java.lang.InternalError: fillbuf
Good one..... ( System.out.println() )