Use javabean input and output stream to read, modify, and empty files