Project

Profile

Help

Support #3237 » NonCloseFileOutputStream.java

Aniruddha Joag, 2017-05-25 17:44

 
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
{

for (StackTraceElement ste : Thread.currentThread().getStackTrace()) {
System.out.println(ste);
}
//super.close();
}

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