Не вызывается нужный метод объекта fileWriter в методе public void write(String str, int off, int len) throws IOException