• Post Reply Bookmark Topic Watch Topic
  • New Topic

pipe  RSS feed

 
abalfazl hossein
Ranch Hand
Posts: 635
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A pipe consists of a pair of channels: A writable sink channel and a readable source channel.


May you give me example for this? writable sink
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Abalfazl,

it sounds more complicated than it is. Pipes in programming work very similar to pipes in real life - hence the name. Think of a water pipe for example. There's one end of the pip where the water goes in (you write "data" to it) and the other end of the pipe where the water flows out (you can read "data" from this end). In programming both "ends" of the pipe can often be used as two distinct channels.

If you're familiar with Linux you will probably know the pipes concept from the command line. You can often concatenate different commands with pipes. That means the output of one command "flows" through a pipe to the input channel of the next command in the chain.

Marco
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!