Что не так?
package com.javarush.task.task19.task1917;
import java.io.*;
import java.util.Arrays;
/*
Свой FileWriter
*/
public class FileConsoleWriter {
private FileWriter fileWriter;
public FileConsoleWriter(String fileName) throws IOException {
fileWriter = new FileWriter(fileName);
}
public FileConsoleWriter(String fileName, boolean append) throws IOException {
fileWriter = new FileWriter(fileName, append);
}
public FileConsoleWriter(File file) throws IOException {
fileWriter = new FileWriter(file);
}
public FileConsoleWriter(File file, boolean append) throws IOException {
fileWriter = new FileWriter(file, append);
}
public FileConsoleWriter(FileDescriptor fd) {
fileWriter = new FileWriter(fd);
}
public void write(char[] cbuf, int off, int len) throws IOException {
fileWriter.write(cbuf, off, len);
for (; off < len; off++) {
System.out.println(off++);
}
}
public void write(int c) throws IOException {
fileWriter.write(c);
System.out.println(c);
}
public void write(String str) throws IOException {
fileWriter.write(str);
System.out.println(str);
}
public void write(String str, int off, int len) throws IOException {
fileWriter.write(str, off, len);
System.out.println(str.substring(off,len));
}
public void write(char[] cbuf) throws IOException {
fileWriter.write(cbuf);
for (char el: cbuf) {
System.out.print(el);
}
}
public void close() throws IOException {
fileWriter.close();
}
public static void main(String[] args) {
}
}