private void applyOptions() throws SocketException {
        if (mOptions == null || mSocket == null) {
            return;
        }

        Object[] options = mOptions;
        Object value;

        if ((value = options[0]) != null) {
            mSocket.setTcpNoDelay(((Boolean)value).booleanValue());
        }
        if ((value = options[1]) != null) {
            if (value instanceof Boolean) {
                mSocket.setSoLinger(((Boolean)value).booleanValue(), 0);
            }
            else {
                mSocket.setSoLinger(true, ((Integer)value).intValue());
            }
        }
        if ((value = options[2]) != null) {
            mSocket.setSoTimeout(((Integer)value).intValue());
        }
        if ((value = options[3]) != null) {
            mSocket.setSendBufferSize(((Integer)value).intValue());
        }
        if ((value = options[4]) != null) {
            mSocket.setReceiveBufferSize(((Integer)value).intValue());
        }
        if ((value = options[5]) != null) {
            mSocket.setKeepAlive(((Boolean)value).booleanValue());
        }
    }