User Profile

Collapse

Profile Sidebar

Collapse
diegoblin
diegoblin
Last Activity: May 7 '09, 07:25 PM
Joined: Apr 22 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I'm using this class to read from console

    Code:
    class LeeConsola
    {
    		
    	String devuelveCadena () throws IOException
    	{
    		BufferedReader BRobj = new BufferedReader(new InputStreamReader(System.in));
    		
    		char caracterEntrada;
    		String cadena = "";
    		
    				
    		do
    		{
    			caracterEntrada = (char)  BRobj.read();
    			cadena = cadena
    ...
    See more | Go to post

    Leave a comment:


  • I already did it, for example if i type 127.0.0.1 and print that String it says 127.0.0.1, also i checked the string length with dirIp.length() and it's correct!
    See more | Go to post

    Leave a comment:


  • diegoblin
    started a topic socket error when reading ip address from console
    in Java

    socket error when reading ip address from console

    hello, i have this issue.Every time i use sockets if i use a "String" as a parameter the connection resets. but if i put the ip address like this "127.0.0.1" it okay.

    and i got this message if i use a string i read from the console

    Exception in thread "main" java.net.Socket Exception: Connection r
    at java.net.Socket InputStream.rea d(Unknown Source)
    at sun.nio.cs.Stre amDecoder.readB ytes(Unknown...
    See more | Go to post

  • diegoblin
    started a topic transfer a file between server and client
    in Java

    transfer a file between server and client

    Hi, i kind of new to java and i want to transfer a file between a server and a client.
    I know i have to use InputStream and OutputStream, but i don't know how to do it properly.
    So far i think i've managed to do the client part. i read the content of a file, "hi.txt", and i send it to the server.

    The problem is in the server part, i do not know how to write the file in the server. Thanks in advance for your help...
    See more | Go to post
No activity results to display
Show More
Working...