A federal judge in California said Wednesday that the wiretapping law established by Congress was the “exclusive” means for the president to eavesdrop on Americans, and he rejected the government’s claim that the president’s constitutional authority as commander in chief trumped that law.