This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes How to properly use piped streams Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to properly use piped streams" Watch "How to properly use piped streams" New topic
Author

How to properly use piped streams

Phil Chuang
Ranch Hand

Joined: Feb 15, 2003
Posts: 251
Here's the skinny:
Say I have a socket client & server running, and I want to add a layer of encryption. I modify the client to encrypt the output, but I don't want to modify the server. So what I'm doing is making a pass-through sort of server that does the decryption for me, then passes the decrypted stuff to the server. This is really a question more about streams than sockets. So what I'm doing in the pass-through is receiving a socket connection from the client, and opening a socket on the server, then decrypting the stream as it passes through. I got some piped stream examples off the internet, but I am failing to get them to work. Anybody here have experience using piped streams, and want to give me a few pointers?
 
Consider Paul's rocket mass heater.
 
subject: How to properly use piped streams
 
Similar Threads
Bunch of NIO questions
Problem with simple chat app
chat
Socket reuse and security
How to calc bytes written into OutputStream