Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

decapriated method

807588Apr 5 2009 — edited Apr 5 2009
Hey, im hacing a little trouble with the old getBytes() being decapriated. I have encryption on my application, and heres an example method.

this gives me the wrong string
	public void writeString(java.lang.String s) {
		//s.getBytes(0, s.length(), buffer, currentOffset);
		s.getBytes();
		currentOffset += s.length();
		buffer[currentOffset++] = 10;
	}
but if i use
s.getBytes(0, s.length(), buffer, currentOffset);
then it gives me the right thing. Im not willing to change me entire encryption method, so is there a way to override the warning generated by this? Ive never had a problem with it malfunctioning. Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 3 2009
Added on Apr 5 2009
2 comments
210 views