Swartz is smart and has interned for (law professor) Larry Lessig.
I doubt he's even going to try to make the case he didn't know it was illegal.
This is civil disobedience against unjust laws at its best.
To quote Wikipedia's summary of Martin Luther King's "Letter from Birmingham Jail"
Against the clergymen’s assertion that the demonstration was against the law, he argued that not only was civil disobedience justified in the face of unjust laws, but that "one has a moral responsibility to disobey unjust laws."[1]