Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transfer data from java application to c#

Tags:

java

c#

I need to transfer byte array from my java app to a c# app. One option is just store it into a file but its not so secure. I was thinking maybe there is a way to use a memorystream or something so the data wont be stored anywhere else than memory.

EDIT: Just to give more information. Applications run on the same machine and C# applications is executing the java application.

like image 886
hs2d Avatar asked Jul 26 '26 01:07

hs2d


2 Answers

You can expose methods in a way that will allow the two application to speak to each other. Here is a similar question with numerous answers.

like image 85
Josh M. Avatar answered Jul 27 '26 15:07

Josh M.


If you are only transferring a byte array between programs on the same computer, using a socket could be easiest to implement.

The down side is you will need to ensure the listening server socket doesn't accept connections from any other hosts (bind to localhost only).

The most secure way to do this is via shared memory.

like image 37
Gareth Davis Avatar answered Jul 27 '26 15:07

Gareth Davis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!