I copy and pasted the code from this baeldung tutorial.
package aaanalysis; import java.io.File; import java.io.FileInputStream; import java.