'...walking along a pond, deep in the Maine woods.'
So.... were you in National Forest or on unfenced private property?
There's considerable difference between a warning and an attack. Most dogs just threaten, protecting what they perceive (right or wrong) as their territory, and they're hoping they can bluff you so you leave the area.
Unless they're downright vicious, they probably won't actually attack, unless you provoke them.
Don't stare them in the eye -- that's sign of aggression on your part.
Stand still, don't run -- run, and you instantly become prey.
You might even call them in a cheerful voice and tell them to come. I've seen that truly flummox a dog -- they don't know what they should do, but they seem to think attacking isn't it.
FYI: The two biggest threats in pet canines are Pitbulls and Rottweilers. According to Animal People (July/August 2004), "Over the past decade the number of life-threatening and fatal pit bull attacks increased 789%. The number of life-threatening and fatal Rottweiler attacks leaped 2000%... During that time, pit bulls, Rottweilers, and their mixes have gone from being less than 1% of the total U.S. dog population to as much as 8%, almost perfectly parallel to the rates of increase in life-threatening and fatal attacks involving them."
If you intend to shoot every dog that threatens you, don't be surprised if some irate owner does the same to you.
Sue