что не так?
package com.javarush.task.task18.task1813;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
/*
AmigoOutputStream
*/
public class AmigoOutputStream extends FileOutputStream {
public static String fileName = "C:/tmp/result.txt";
private FileOutputStream object;
public AmigoOutputStream (FileOutputStream object) throws FileNotFoundException
{
super(fileName);
this.object = object;
}
public static void main(String[] args) throws FileNotFoundException {
new AmigoOutputStream(new FileOutputStream(fileName));
}
public void close() throws IOException
{
object.flush();
byte[] bytes = new String("JavaRush © All rights reserved.").getBytes();
object.write(bytes);
object.close();
}
public void flush() throws IOException {
object.flush();
}
public void write(byte[] b, int off, int len) throws IOException
{
object.write(b,off,len);
}
}