I am developing an Android accessory app that will implement MS Synchronization Libraries.
When I connect my device to a windows machine via USB, I end up with a FileDescriptor.
Using the Java.IO classes, I can write to and read from this FileDescriptor with FileOutputStream and FileInputStream.
However, MS Sync libraries require a System.IO.Stream with which to read and write stuff.
My questions are:
Simple: Can I cast a Java.IO.OutputStream or Java.IO.InputStream to a System.IO.Stream?
If so, how because (Stream)outpustream does not work.
More difficult: Can I access the FileDescriptor's channel using MS IO classes such as System.IO.FileStream?
I know this will involve advanced JNI calls but I really need some kind of direction here.
I tired newing a FileStream using the FileDescriptor's Handle but I get an Invalid IntPtr exception.