FileDocCategorySizeDatePackage
AsyncReadSocket.javaAPI DocExample1385Tue Jan 28 17:11:58 GMT 1997None

AsyncReadSocket

public class AsyncReadSocket extends Thread

Fields Summary
private Socket
s
private StringBuffer
result
Constructors Summary
public AsyncReadSocket(Socket s)

        this.s = s;
        result = new StringBuffer();
    
Methods Summary
public java.lang.StringgetResult()

        String retval = result.toString();
        result = new StringBuffer();
        return retval;
    
public voidrun()

        DataInputStream is = null;
        try {
            is = new DataInputStream(s.getInputStream());
        } catch (Exception e) {}
        while (true) {
            try {
                char c = is.readChar();
                result.append(c);
            } catch (Exception e) {}
        }