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 searching for DVDDbAdapter source code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "searching for DVDDbAdapter source code" Watch "searching for DVDDbAdapter source code" New topic
Author

searching for DVDDbAdapter source code

Bob Chandler
Ranch Hand

Joined: Jan 13, 2004
Posts: 33
Hey guys,
does anyone have a copy of the actual source code for DVDDbAdapter
class (Max Habibi study guide example project)?
It's the only one that downloads from apress.com as a class file and
I would really like to take a look at the source.
ta,
Bob
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

I have no idea if I am right, but isn't the source code written in the book?
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Satish Avadhanam
Ranch Hand

Joined: Aug 12, 2003
Posts: 697
Hi Bob

Originally posted by Bob Chandler:
Hey guys,
does anyone have a copy of the actual source code for DVDDbAdapter
class (Max Habibi study guide example project)?
It's the only one that downloads from apress.com as a class file and
I would really like to take a look at the source.
ta,
Bob

Good Luck.
[Andrew: removed code - see below]
[ March 31, 2004: Message edited by: Andrew Monkhouse ]
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11478
    
  94

Hi Bob,
I suggest you go to the download page and download the code again.
You will see on the download page the following notice:

The source code for this book has been restricted at the request of the author.

That being the case, I think it would be unethical for us to provide code here. As Mark mentions, the code is in the book.
When I originally downloaded, that source file was in the distribution (which is how I imagine Satish got a copy). I just downloaded it again now to check, and it is still in there:

So it is all available when you download it.
Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Bob Chandler
Ranch Hand

Joined: Jan 13, 2004
Posts: 33
Thanks for all of your responses...
I have no idea if I am right, but isn't the source code written in the book?

Mark and Andrew, there is a snippet of DVDDbAdapter in the book, but I wanted to view the class in it's entirity
I made a lil' mistake when I viewed the downloaded file, though....
A cursory glance had me thinking in was in bytecode format...you'd thinmk the .java file extension would be a dead giveaway :roll:
turns out it is in fact the source file in question, but without any structured format (i.e. spaces appear as square boxes and there's no white space visible - just a jumble)
I will endeavour to re-format it by hand later - but thank you guys for all your helpful comments
Foolish Bob
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11478
    
  94

Hi Bob,
Originally posted by Bob Chandler:
it is in fact the source file in question, but without any structured format (i.e. spaces appear as square boxes and there's no white space visible - just a jumble)

Ahhh - it is not in Microsoft DOS text format!
Just confirmed this by looking at the files DVDDbAdapter.java & DVD.java:

File DVD.java termiates each line with 0x0d 0x0a
File DVDDbAdapter.java terminates each line with 0x0a
WordPad.exe and Write.exe will happily read the file and handle the 0x0a as the line terminator.
Or you could write a simple Java program to go through the file changing each instance of 0x0a into 0x0d 0x0a pairs .
Regards
Andrew
Bob Chandler
Ranch Hand

Joined: Jan 13, 2004
Posts: 33
Andrew,
I have much to learn (chuckle)....
once again, thanks for the tips - and yes, I will attempt
to write the conversion code.
Bob
Max Habibi
town drunk
( and author)
Sheriff

Joined: Jun 27, 2002
Posts: 4118
Hi Bob,
Thanks for bringing this to my attention. I'll get it corrected.
All best,
M


Java Regular Expressions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: searching for DVDDbAdapter source code