The Artima Developer Community
Sponsored Link

Java Answers Forum
Problem with InputStreamReader

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
Jose Ramon Cao

Posts: 1
Nickname: jnetven
Registered: Nov, 2002

Problem with InputStreamReader Posted: Nov 6, 2002 1:06 PM
Reply to this message Reply
Advertisement
Hi,

I have the folowing code:

1 Socket socket = new Socket(host, port);
2 PrintWriter sout =
new PrintWriter(socket.getOutputStream(),true);
3
4 BufferedReader sin = new BufferedReader(
5 new InputStreamReader(
6 socket.getInputStream()));
7
8
9 InputStreamReader sin =
new InputStreamReader(socket.getInputStream());

10 // I read the firts line produced by the
// remote machine
11 String line = sin.readLine();
12 line = sin.readLine();
13
14
15 // I put login and password to the remote machine
16 sout.println(login);
17 sout.println(passwd);
18
19 line = sin.readLine();
20
21 // I put the command to the remote machine
22 sout.println("hssdp:snb=158" + nro_telf + ",list;");

When I execute this code in Windows 2000 everything works fine.
When I excute this code in UNIX (Solaris) everything works fine until line 19. When the program reach line 19, it stays hold and do nothing else. What could be the problem ????

Please help me!!!!

Thanks in advance.

Topic: Urgent-Where can i find the cookie generated by Domino Server Previous Topic   Next Topic Topic: Need help with button targets...

Sponsored Links



Google
  Web Artima.com   

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