Exception Handling Problems - Page 2
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18

Thread: Exception Handling Problems

  1. #16
    Join Date
    Jan 2011
    Posts
    18

    Arrow 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);
    	     }
         }
    }

  2. #17
    Join Date
    Feb 2003
    Location
    Sunny Glasgow!
    Posts
    257

    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.

  3. #18
    Join Date
    Jan 2011
    Posts
    18

    Thumbs down 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.

Page 2 of 2 FirstFirst 12

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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center