/* * ExtendedWorkbook.java * * Created on 27. November 2006, 14:43 * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package javaapplication5; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; /** * * @author kj09 */ public class ExtendedWorkbook extends org.apache.poi.hssf.usermodel.HSSFWorkbook { private OutputStream y; /** Creates a new instance of ExtendedWorkbook */ public ExtendedWorkbook(InputStream s) throws IOException { super(s); } public OutputStream write(java.io.OutputStream stream) throws java.io.IOException { if(y == null){ y = new OutputStream(); super.write(y);} return((OutputStream) y.clone()); } }