my dog learned polymorphism*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Deprecated Methods and Reading file 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 "Deprecated Methods and Reading file" Watch "Deprecated Methods and Reading file" New topic

Deprecated Methods and Reading file

Adam Roberts
Ranch Hand

Joined: Mar 18, 2002
Posts: 71
I realize I should have done this earlier, but I set out to work on my search function w/o fixing the deprecated methods. The search, though, never succeeds because of all the entries are followed by whitespace characters(at least thats what I think it is, appears like a box on my OS). Does this have something to do with the deprecated read method? Read the API breifly, it said the method does not read the bytes correctly,etc.
Just a simple yes or no would suffice

Adam Roberts - SCJP2, SCJD<br />insert witty something here
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi Adam,
Actually it has to do with padding of the fixed field size of the db. Those "boxes" you see are ASCII nulls ('\0'). All you need to do is trim() all the Strings to get rid of the "boxes".
Hope this helps
Michael Morris

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Adam Roberts
Ranch Hand

Joined: Mar 18, 2002
Posts: 71
Okay thanks again for your help with my silly q's
I agree. Here's the link:
subject: Deprecated Methods and Reading file
Similar Threads
public boolean handleEvent(Event e) method:
JDK1.4 migration
Marcus Mock exam 2 Threads
How do I deprecate an interface?