-
February 3rd, 2011, 11:29 AM
#16
Re: Exception Handling Problems
Client:
Code:
import java.io.*;
import java.net.*;
class Client3{
public static void main(String[] args) {
String clientCar="";
String clientBranch="";
String clientDriver="";
String clientPasswd="";
DataOutputStream out;
DataInputStream in;
try {
Socket t = new Socket("127.0.0.1", 9001);
in = new DataInputStream(t.getInputStream());
out = new DataOutputStream(t.getOutputStream());
BufferedReader br = new BufferedReader
(new InputStreamReader(System.in));
boolean more = true;
System.out.println(in.readUTF());
while (more) {
clientCar = in.readUTF();
clientBranch = in.readUTF();
clientDriver = in.readUTF();
clientPasswd = in.readUTF();
if ((clientCar == null) || (clientBranch == null) || (clientDriver == null) || (clientPasswd == null))
more = false;
else
out.writeUTF(clientCar+"\n");
out.flush();
out.writeUTF(clientBranch+"\n");
out.flush();
out.writeUTF(clientDriver+"\n");
out.flush();
out.writeUTF(clientPasswd+"\n");
out.flush();
}
} catch(IOException e){
System.out.println("Error" + e);
}
}
}
-
February 3rd, 2011, 12:39 PM
#17
Re: Exception Handling Problems
2nd page and still no error message.
You've been asked many times - either post the error message or nobody will be able to help you.
-
February 3rd, 2011, 07:51 PM
#18
Re: Exception Handling Problems
M so sorry, my software is spoilt so m unable to test my code hence I can't post error messages yet. Waiting for a frnd to cum online so I can test on her compiler. Reinstalling my compiler has failed many times. Now, m partly running out of time & have yet to find java code for symmetric key block cipher which works, a working md5 algorithm & do string comparison successfully. Hence m asking some1 to see if my code is alright. I can't find working NTLM authentication java code either. So many things & m still @ a trial & error phase.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|