add wave and reverse algorithm.
fix struts2 stream error
add check
algorithm