Reading a DataStream attached to a Catalog can cause a
subsequent write to that Catalog record to fail with -1
bytes written. This happens even if the new record is
not long enough to hold the items read and
setRecordPos() method is used to reposition internal
pointers before the writeBytes().
The -1 is returned on Windows XP, with the application
performing properly on PocketPC and Java platforms.
PalmOS and Symbian were not tested.
The attached code is a simplifed subset of the
application used. On our testbed under Win32 SuperWaba
5.53 (installed in C:\SuperWaba) and Windows XP
Professional, the compiled application fails 100% of
the time.
When the user clicks the [GO] button, the core code in
SignatureStore.java creates a new record 1 byte long,
sets the record pointer to that new record, and assigns
a DataStream to it.
Two items are then read from the DataStream - which
will of course fail.
A buffer is then filled with values from
ByteArrayStream/DataStream and the record pointer is
reset. When the buffer is written to the record, a
write failure occurrs. This is detected and a
MessageBox displayed.
Java files used to produce the error
Logged In: YES
user_id=180823
Originator: NO
I'm not able to open that kind of file here.