What is causing this button to crash?
<p>I'm writing an app that allows me to send a command through TCP/IP by clicking a button. However when I click to the button in the emulator it comes back with a message saying the button has stopped working. I was wondering if anyone could spot the error in my code.</p>

<p><strong>CODE:</strong></p>

<pre><code>package button.test;  
import java.io.IOException;  
import java.io.OutputStream;  
import java.net.Socket;  
import java.net.UnknownHostException;  
import android.app.Activity;  
import android.os.Bundle;
import android.view.View;  

public class ButtonActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
    public void onClick(View view) throws UnknownHostException, IOException
    {
        Socket socket = new Socket("192.168.2.92", 60128);
        try{
            dataOutputStream.Object BUFFER = null;
            write(BUFFER);
            String buffer="ISCP000000100000000701000000!1PWR010D";
            OutputStream os=socket.getOutputStream();
            os.write(buffer.getBytes()); 
        } catch(IOException e)
        {
            //error code
        }

    }
    private void write(Object BUFFER) {
        // TODO Auto-generated method stub

    }
}
</code></pre>
