The Artima Developer Community
Sponsored Link

Java Answers Forum
java pipes

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
vic

Posts: 1
Nickname: vic366
Registered: Nov, 2003

java pipes Posted: Oct 31, 2003 11:57 PM
Reply to this message Reply
Advertisement
how to create new Thread 1 in the main thread, and then creates Pipe1 and Pipe2 in the thread 1, New Thread 1 first creates pipes Pipe1 and Pipe2 and then New Thread 2. New Thread 1 then sends the file name, via Pipe1, to New Thread 2. New Thread 2 then opens a file, reads the first five lines, and sends the lines back to New Thread 1 via Pipe2. New Thread 2 only searches its current working directory for the file, unless a full pathname is given. In this case New Thread 2 uses the full pathname to open the file. If the file does not exist, New Thread 2 should return an error message, as shown in the example printout of the TextArea in the main thread. Also, if a file contains less than 5 lines, New Thread 2 should return all the lines.

Topic: Ticker Previous Topic   Next Topic Topic: Mail Attachment a file from Client machine

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use