This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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: 17271

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 - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: is String.getBytes() efficient??
It's not a secret anymore!