Project

Profile

Help

Support #3237 » NonCloseFileOutputStream.java

Aniruddha Joag, 2017-06-01 16:53

 
package test.saxon.streaming.transformerhandler;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class NonCloseFileOutputStream extends FileOutputStream
{
public NonCloseFileOutputStream(File file) throws FileNotFoundException
{
super(file);
}

@Override
public void close() throws IOException
{
System.out.println("NonCloseFileOutputStream -> close()");
// for (StackTraceElement ste : Thread.currentThread().getStackTrace()) {
// System.out.println(ste);
// }
super.close();
}

@Override
public void flush() throws IOException
{
System.out.println("NonCloseFileOutputStream -> close()");
// for (StackTraceElement ste : Thread.currentThread().getStackTrace()) {
// System.out.println(ste);
// }
super.flush();
}
}
(8-8/15)