• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

deprecated methods

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What class is this method in?
 
parthiban subramaniam
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in package "suncertify.db" the "Data" class method public void writeRecord uses this deprecated method
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
cheers mic
reply
    Bookmark Topic Watch Topic
  • New Topic