| Author |
Data update/retrieve format
|
Surya Kumar
Ranch Hand
Joined: Aug 21, 2004
Posts: 52
|
|
|
i am using a string buffer for updation. For a field 'a' with length 10 and content 'TEST'i 'll be storing TEST\x0000\x0000\x0000\x0000\x0000\x0000. But when retreiving i am taking TEST\x0000\x0000\x0000\x0000\x0000\x0000 but trimming the data and using it. Is it ok or not ok as per the null termination of strings is concerned.
|
Regards<br />Prem<br />SCJP, SCJD, SCWCD, SCBCD, SCEA, SCJDWS
|
 |
Anton Golovin
Ranch Hand
Joined: Jul 02, 2004
Posts: 473
|
|
Originally posted by Surya Kumar: i am using a string buffer for updation. For a field 'a' with length 10 and content 'TEST'i 'll be storing TEST\x0000\x0000\x0000\x0000\x0000\x0000. But when retreiving i am taking TEST\x0000\x0000\x0000\x0000\x0000\x0000 but trimming the data and using it. Is it ok or not ok as per the null termination of strings is concerned.
IMHO, if your provided data file does not have null termination, it is not necessary. The requirements say of a different application that also accesses this data file. Since it was provided to you without null termination, it is safe to assume that is how that other application uses it. But of course it is a good candidate to be described in choices.txt.
|
Anton Golovin<br /><i>anton.golovin@gmail.com</i><br />SCJP, SCJD, SCBCD, SCWCD
|
 |
 |
|
|
subject: Data update/retrieve format
|
|
|