How to use BusSignal to send FileInputStream or FileDescriptor?

asked 2014-12-07 04:46:46 -0700

letingoo gravatar image

I want to use BusSIgnal to send FileDescripter.I define a SendFD function in BusInterface.

public void SendFD(FileDescriptor fd) throws BusException;

But it reports:"org.alljoyn.bus.AnnotationBusException: field public static final java.io.FileDescriptor java.io.FileDescriptor.err of class java.io.FileDescriptor does't annotate position".

I want to know what does it mean.Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-01-13 13:26:37 -0700

bspencer gravatar image

Using the Java Language Binding you are only able to send Complex Data Types that are Annotated with the correct markings such that they can be marshaled over AllJoyn to another application. As such FileDescriptor is a class that does not contain the correct Annotations and cannot be marshaled.

What you will want to do is create your own data object that represents the information you want to send over and then have this Object Annotated such that you can have a SendMyFD(MyFileDescriptor myFD) over the wire.

This NameId.java file from the ContactsService samplewill help you with the correct syntax. Also, note that the inherited classes need to be fully annotated as well, so a class that implements FileDescriptor can not be marshaled.

Here is some helpful reading on the Data Exchange under the AllSeen Alliance Developer section of the website.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-12-07 04:46:46 -0700

Seen: 222 times

Last updated: Jan 13 '15