File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes   [Bodgit Scrapper]  what's the meaning of magic cookie value? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "  [Bodgit Scrapper]  what Watch "  [Bodgit Scrapper]  what New topic
Author

[Bodgit Scrapper] what's the meaning of magic cookie value?

he qinfeng
Greenhorn

Joined: Sep 13, 2003
Posts: 23
Hi everyone:
At the start of the data file, there is 4 byte numeric, magic cookie value. Identifies this as a data file.
It means that the magic cookie only indicated the file is a data file ,not indicated the location of start of the record ?
Thanks for your answer.


SCJP<br />SCJD(in progress)
Stef Widmer
Greenhorn

Joined: Jun 16, 2004
Posts: 17
Hi
The magic cookie is just a number which identifies your data file as a the right data file. Serveral people have different numbers. I got 512.
Just test for the correct number when you open your file.
Hope that helps.
Stef
he qinfeng
Greenhorn

Joined: Sep 13, 2003
Posts: 23
how to test the magic value?
my number is 195,is it right?
Stef Widmer
Greenhorn

Joined: Jun 16, 2004
Posts: 17
Do something like this

[ July 01, 2004: Message edited by: Stef Widmer ]
he qinfeng
Greenhorn

Joined: Sep 13, 2003
Posts: 23
thank you very much
Robert Konigsberg
Ranch Hand

Joined: Jun 23, 2004
Posts: 172
Yes thank you. I made the mistake of using assert() and not throw.


SCJP 1.4 (91%)<br />SCJD 1.4 (376/400, 94%)
 
 
subject: [Bodgit Scrapper] what's the meaning of magic cookie value?
 
Similar Threads
NX:URLyBird What's magic cookie?
How to read MAGIC for db-2x2.db
NX:About MAGIC flag in the Data file
NX: Magic Cookie
magic cookie value?