Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

deprecated methods

 
parthiban subramaniam
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What class is this method in?
 
parthiban subramaniam
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in package "suncertify.db" the "Data" class method public void writeRecord uses this deprecated method
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
parthiban subramaniam
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cheers mic
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic