• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deprecated method

 
Chandresh Shah
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getBytes() method is deprecated. What xcan be used instead.
Can anyone provide the clue?
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the 1.3 API:
getBytes(int srcBegin, int srcEnd, byte[] dst, int dstBegin)

Deprecated. This method does not properly convert characters into bytes. As of JDK 1.1, the preferred way to do this is via the getBytes(String enc) method, which takes a character-encoding name, or the getBytes() method, which uses the platform's default encoding.
 
Terry McKee
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What encoding should be used? and why?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic