I believe, the standard JDK does not have an API satisfying your need directly. However, using java.io.*, java.net and java.nio.* packages you may attempt to write a custom client. Also you may search the Internet for ready-made Java library.
I've done Java TCP networking before between different environments (OS's). Worked just fine. I recommend just sending the data through a socket...Don't know much about SFTP, so can't help you there...You could try UDP, maybe? Never used UDP either so, no clue.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” (Mosher's Law of Software Engineering)
“If debugging is the process of removing bugs, then programming must be the process of putting them in.” (Edsger Dijkstra)