SSLSocket problem using BufferedWriter
<p>Im having problem sending command when using BufferedWriter</p>

<p>Here is example</p>

<pre><code>    SSLSocketFactory f = context.getSocketFactory();
    SSLSocket c = (SSLSocket) f.createSocket("198.168.0.10", 8888);
    c.setSoTimeout(20000);
    c.setUseClientMode(true);
    c.startHandshake();

        BufferedWriter w = new BufferedWriter(
           new OutputStreamWriter(c.getOutputStream()));
        Thread.sleep(500);
        w.write("username");
        w.flush();
        Thread.sleep(50);
        w.write("password");
        w.flush();
        Thread.sleep(50);
        w.write("command");
        w.flush();
        Thread.sleep(50);
</code></pre>

<p>Problem is without Thread.sleep it doesnt work, if i lower number than 50 problems begin. Any idea how to fix it, or mabe use another writer?</p>
