cancel
Showing results for 
Search instead for 
Did you mean: 

Howto use DefaultBinaryManager ?

zyx974_
Confirmed Champ
Confirmed Champ

Hi,

I need to retrieve the filesystem's filename of the principal blob of a document. I would like to use the code below to retrieve this info :

String digest = blob.getDigest();
DefaultBinaryManager manager = ???? ;
File file = manager.getFileForDigest(digest, false);
String name = file.getName();

But I don't know how to initialise "manager".

Is this the good way to do it ?

How can I get the instance of DefaultBinaryManager ?

1 REPLY 1

Florent_Guillau
World-Class Innovator
World-Class Innovator

You shouldn't do that because you're accessing the internals of the blob storage which may change at any time. However, given the above, if you really want to do it you can do:

Binary binary = ((SQLBlob) blob).getBinary();
File file = ((FileSource) binary.getStreamSource()).getFile()
Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.