File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Product and Other Certifications and the fly likes is String.getBytes() efficient?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "is String.getBytes() efficient??" Watch "is String.getBytes() efficient??" New topic

is String.getBytes() efficient??

Terence Doyle
Ranch Hand

Joined: May 30, 2001
Posts: 328
This is Objective 6.2:
Develop code that correctly implements adding, retrieving, modifying, and deleting individual records in a RecordStore, and converting RecordStore record data to and from byte arrays, and that reflects performance implications.

Is the getBytes() method of the String class considered to be an efficient way of placing text in a RecordStore? or should we use some other method involving ByteStreams?
What about new String( byte[] ) for getting Records out??

Thanks in advance for any advice,

Raising Flares debut album 'Ignition' out now

Terry Doyle <br />SCPJ 1.4 , SCWCD , SCMAD(Beta)
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Actually that is what I use to read and write records to my RecordStore. I would think that just the act of opening up the Streams would take time.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: is String.getBytes() efficient??
jQuery in Action, 3rd edition