File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes null terminated text values in the DB? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "null terminated text values in the DB?" Watch "null terminated text values in the DB?" New topic
Author

null terminated text values in the DB?

Xabier Martija
Ranch Hand

Joined: Jul 18, 2007
Posts: 40
Hi,

In my assignments instructions i have read this:


but what i found in the DB is that all the text values don't end with "null" values. They end with 0x20 (blanks) values until end of value length.

I expected they sould end with 0x00 values. That's what i think a "null" value sould look like.Am i wrong?

Actually i create a StringBuffer this way and the default value for byte is 0x00:



Could someone help me?
John Stone
Ranch Hand

Joined: May 04, 2007
Posts: 332
This is common problem. Make a note in choices.txt and decide whether you will use spaces or nulls and document that decision as well.
Xabier Martija
Ranch Hand

Joined: Jul 18, 2007
Posts: 40
Thank you.
I will document it in my choices.txt.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: null terminated text values in the DB?
 
Similar Threads
NX (Contractors): Encoding instructions unclear?
Null terminated string
NX:[URLyBird]Get the correct field values
.db file format problem, help please!!!
Data file format from new assignment