Start a Conversation

Unsolved

This post is more than 5 years old

3350

July 27th, 2009 04:00

Doubts about FPTag_BlobReadPartial (SDK API Java)

Hi Dears,

I'm a beginner in developing with Java Centera SDK API and my question is related to corret use of the method FPTag_BlobReadPartial of Java Centera SDK API with java.io.FileOutputStream.For each thread, I should close the OutputStream object or I just close it after all join threads ?

Regards,

Elton Vianna

1 Attachment

July 27th, 2009 08:00

So dears,

API Reference Guide says:

...

FPTag_BlobReadPartial

...

Concurrency requirement: Concurrent threads cannot operate on the same stream.

I will try this... thanks anyway!

Elton

417 Posts

July 27th, 2009 10:00

You should only close an FP object a single time. If you share a reference across multiple threads (e.g. a Pool connection or a Clip / Tag reference) then it should be closed once all the streams using the object have completed.

Be careful that you do not attempt to close an object which has underlying objects still open (e.g. a Pool connection that has open clips, or a clip reference that has open tags) as this will result in OBJECT_IN_USE exceptions being thrown.

417 Posts

July 27th, 2009 10:00

The concurrency requirement here is on the FPStream object you are reading the data into, it is not a limitation of BlobReadPartial itself. In other words, it is possible to use BlobReadPartial to read the cluster data in parallel from a Blob on a Tag. This can be done by reading segments of the object into multiple files on disc, or into different sections of a memory buffer that you have created in memory.

July 27th, 2009 10:00

That's okay Mr Stuart,

Many thanks for your help!

Best regards,

Elton

No Events found!

Top