AnsweredAssumed Answered

ArcObjects Java IMemoryBlobStream

Question asked by OCatton on Feb 25, 2015
Latest reply on Feb 26, 2015 by ebrimhall

Hi All,


I have written a Java addin tool to open all attachments on a point feature in the PCs default image viewer.

I was using the Working with Attachments, ArcObjects Help for .NET developers , as a starting example to achieve this.


But when I use the code snippet below, it successfully loops through all the attachments reading the name


ITableAttachments attachTable;
attachTable = new ITableAttachmentsProxy(pFeatureClass);
IAttachmentManager attachMan = attachTable.getAttachmentManager();
ILongArray IdArray = new LongArray();
IEnumAttachment attachEnum = attachMan.getAttachmentsByParentIDs(IdArray, true);
IAttachment attach =;
while (attach != null){
 System.out.printf("%s,: %s\n", attach.getAttachmentID(), attach.getName() );
 IMemoryBlobStream memBlob = attach.getData();
 attach =;


But it fails to save the IMemoryBlobStream to file with the error,


which implies the blob data was not retrieved from the attachment table.


Any pointer on where I am going wrong would be much appreciated,