file copy line by line to avoid OOM error
string interning
moved to java 1.7