If it were a random stranger, I'd just tell them I'm not gay. That's not hard to do.
If it is someone I've been friends with for a while and they are stupid enough to be flirting with me, then I'd be a little angry. I mean, I'd even be miffed if one of my FEMALE friends just all of the sudden starts being blatently obvious about an attraction to me that they've recently found and didn't bother just telling me about it instead of throwing themselves at me.
When you are good enough friends with someone to call an actual friend, there are boundries you don't just randomly cross because you can't contain your hormones. If someone doesn't have the decency to just tell you how they feel about you instead of just flirting and throwing themselves at you, then they are just being rude. Especially if they are doing it in front of other people. Male or Female... it doesn't matter.
Now if they didn't know you, it's a different matter.
In either case, what would I do? Well, I'd just flat out tell them I'm not interested and that I'm not gay. That's the truth, if they weren't prepared to hear the worst (worst according to them), then they could use the reality check. I mean, what are you gonna do, let them down easy by saying "Oh, I don't quite feel that way about you, but if I ever decide to be gay I'll let you be the first to know!" Aside from that, tell them you feel uncomfortable with them acting that way towards you. They may not realize the way they are acting and might go hit on the next person without thinking twice. Man or Woman, sometimes hitting on someone can cause that person to feel uncomfortable.
Unfortunately for the homosexual population of the world... you are deviant and because of that people are offended when you throw homosexuality in their face. Don't get me wrong, I'm not criticizing anyon'e sexuality, but there is a matter of respect for other people and if you aren't sure, then you should take the time to ask rather than unknowingly offend someone.