Generalized Hamiltonian Formalism For Field Theory