aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Deprecated Methods and Reading file" Watch "Deprecated Methods and Reading file" New topic
Author

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
Thanks


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
Ahhh
Okay thanks again for your help with my silly q's
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deprecated Methods and Reading file