wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes some doubt about urlyBird Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "some doubt about urlyBird" Watch "some doubt about urlyBird" New topic
Author

some doubt about urlyBird

Gerenne Vives
Ranch Hand

Joined: Feb 05, 2005
Posts: 60
Hello , I have some doubts about the assignament UrlYbird:

1-My assignaent said the following:

--------------------------------------------
Repeat to end of file:
1 byte "deleted" flag. 0 implies valid record, 1 implies deleted record
--------------------------------------------

I understand that the file is composite the following form:

name location .....[0 or 1]
this mean that at the end to the records always are a byte that say if the record is valid or not valid , when I read the records , to the end the byte not is read.

2-In the interface some methods throws RecordNotFoundException this exception is throws when not find a record indicate ???

3-when I do a find in a remote mode is necessary lock a records ???

4-the method SecurityException when is throw???

Thanks in advance for your help .
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11476
    
  94

Hi Irene,
Originally posted by Irene Rodriguez:
Hello , I have some doubts about the assignament UrlYbird:

1-My assignaent said the following:

--------------------------------------------
Repeat to end of file:
1 byte "deleted" flag. 0 implies valid record, 1 implies deleted record
--------------------------------------------

I understand that the file is composite the following form:

name location .....[0 or 1]
this mean that at the end to the records always are a byte that say if the record is valid or not valid , when I read the records , to the end the byte not is read.


You have only quoted the first sentence following "Repeat to end of file:" In the instructions I have, they state:
From the instructions:
Repeat to end of file:
1 byte "deleted" flag. 0 implies valid record, 1 implies deleted record
Record containing fields in order specified in schema section, no separators between fields, each field fixed length at maximum specified in schema information
So, for my instructions I have a different order to what you have understood from your instructions. Namely, my instructions are telling me that I should have: [0 or 1]name location .....

As always, check your own instructions - it is possible that your understanding is correct, as there are different instructions out there.

Originally posted by Irene Rodriguez:
2-In the interface some methods throws RecordNotFoundException this exception is throws when not find a record indicate ???


Yes. (Is this a yes/no question? )

I know English is not your native language, and I regret that I dont speak more languages. Reading your question above, I think you are asking "In the interface some methods throws RecordNotFoundException - is this exception thrown to indicate when a record is not found?"

Originally posted by Irene Rodriguez:
3-when I do a find in a remote mode is necessary lock a records ???


No. The only time it is necessary to lock a record is when you are modifying it in some way.

When you are reading a record, or performing a find operation, you only need to consider the state of the record at the time you read it. If it gets modified 1 second after you read it - too bad.

Originally posted by Irene Rodriguez:
4-the method SecurityException when is throw???


This is dependant on what your instructions tell you, but typically this is thrown when a client tries to do modify or unlock a record when they do not own the lock.

This is similar to reserving a seat at the cinema. If all seats are reserved, and somebody tries to sit in a seat just because there is nobody there, then management will call security.

Regards, Andrew


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

Joined: Feb 05, 2005
Posts: 60
ok thanks , I understand , my intruction say the same that you said me , refrences at byte deleted , this mean that the byte deleted is the followinf form:

[0]-Palace Smallvile....
[1] Palace Sa......

this is correct??
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11476
    
  94

Hi Irene,

Yes, that is correct.

Regards, Andrew
Gerenne Vives
Ranch Hand

Joined: Feb 05, 2005
Posts: 60
ok , thanks!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: some doubt about urlyBird