aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes deprecated methods 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" Watch "deprecated methods" New topic
Author

deprecated methods

parthiban subramaniam
Ranch Hand

Joined: May 15, 2002
Posts: 116
hi guys,
newData[i].getBytes(0, toCopy, buffer, offset);
this is one of the deprecated methods in data class .. jdk documentation suggests getBytes() method to solve this issue .. do we have to hold a temp byte array for each collum and keeptrack of the offset or is there a better way to do this .. am
any advice
and how do we go about in documenting the solution ?
cheers,
parthi.


Even crazy and silly looking problems are sometimes real.
Ron Newman
Ranch Hand

Joined: Jun 06, 2002
Posts: 1056
What class is this method in?


Ron Newman - SCJP 1.2 (100%, 7 August 2002)
parthiban subramaniam
Ranch Hand

Joined: May 15, 2002
Posts: 116
in package "suncertify.db" the "Data" class method public void writeRecord uses this deprecated method
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi parthiban,

this is one of the deprecated methods in data class .. jdk documentation suggests getBytes() method to solve this issue .. do we have to hold a temp byte array for each collum and keeptrack of the offset or is there a better way to do this

You can take care of it with one line of code:

That uses the platform's default encoding. You may want to use a different encoding for example "UTF-8", in which case you should use getBytes("UTF-8") instead of getBytes(). How you decide to deal with the encoding issue will be the basis for documenting your solution.
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
parthiban subramaniam
Ranch Hand

Joined: May 15, 2002
Posts: 116
cheers mic
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: deprecated methods