aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes I feel it is so difficult,who can help me?Thanks!! 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 "I feel it is so difficult,who can help me?Thanks!!" Watch "I feel it is so difficult,who can help me?Thanks!!" New topic
Author

I feel it is so difficult,who can help me?Thanks!!

Jack Fan
Greenhorn

Joined: May 17, 2004
Posts: 3
I download my submission at 2004-2-4,but i have not finish it yet.
I feel so bad.I'm afraid i delayed too long.
Who can tell me when i commit my solution can be accepted?
And how to check the record is deleted after the method public Sting[] read(int recNo) is invoked?
Sorry,my english is poor and i post thread the first time at here.
Appreciate your help very much!!!
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
Hi Fan,

Welcome to JavaRanch and this forum!

Could you please change your displayed name to meet our Naming Policy?

You can change it here. Thank you in advance.

I download my submission at 2004-2-4,but i have not finish it yet.
I feel so bad.I'm afraid i delayed too long.


It's quite common, don't worry about that. There is no time limit anyway. And you probably found the right place to get answers to your SCJD questions...

And how to check the record is deleted after the method public Sting[] read(int recNo) is invoked?


Deleted records I just "normal" ones marked as deleted in the file: records start with a special byte (or short - check your instructions) value.

Good luck with your assignment!

Regards,

Phil.
[ May 17, 2004: Message edited by: Philippe Maquet ]
Jack Fan
Greenhorn

Joined: May 17, 2004
Posts: 3
Thank you,Phli.
Sorry,I did not notice the Naming Policy at first,and I have changed my display name.
About my question I should explain more clearly.
In the interface DB,there is a method "public String[] read(int recNo) throws RecordNotFoundException;" ,how could I use this method?
If I do dot return the record value but throw a RecordNotFoundException when the record is deleted then I could not know how many records does the database have and I could not display all the record.
If I return the record value when the record is deleted and throw RecordNotFoundException only when the EOF is met then I could display all the record easily,but how to check the record is deleted?
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1064
Originally posted by Jack Fan:
In the interface DB,there is a method "public String[] read(int recNo) throws RecordNotFoundException;" ,how could I use this method?
If I do dot return the record value but throw a RecordNotFoundException when the record is deleted then I could not know how many records does the database have and I could not display all the record.If I return the record value when the record is deleted and throw RecordNotFoundException only when the EOF is met then I could display all the record easily,but how to check the record is deleted?


Jack,

We implement the method read() as mentioned in the instructions.
1. Throw RecordNotFoundException if the record is invalid/deleted
2. Return the record values if the record is found

To retrieve all the records and display it to the user we do not use this
method but a different method...something like findByCriteria() or a new method altogether.
Jack Fan
Greenhorn

Joined: May 17, 2004
Posts: 3
Thank you very much,Vishwa.
Your answer really help me.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I feel it is so difficult,who can help me?Thanks!!