Code example for Socket

Methods: getInputStream, getReceiveBufferSize

0
            throw new IllegalArgumentException("Socket may not be null");
        } 
        this.socket = socket;
        this.eof = false;
        if (buffersize < 0) {
            buffersize = socket.getReceiveBufferSize();
        } 
        if (buffersize < 1024) {
            buffersize = 1024;
        } 
        init(socket.getInputStream(), buffersize, params);
    } 
 
    protected int fillBuffer() throws IOException { 
        int i = super.fillBuffer();
        this.eof = i == -1;
        return i;
    } 
 
    public boolean isDataAvailable(int timeout) throws IOException {
        boolean result = hasBufferedData();