/*
+-----------------------------------------------------------------------------------------+
| ILIAS open source                                                                                           |
+-----------------------------------------------------------------------------------------+
| Copyright (c) 1998-2001 ILIAS open source, University of Cologne             |
|                                                                                                                         |
| This program is free software; you can redistribute it and/or                         |
| modify it under the terms of the GNU General Public License                      |
| as published by the Free Software Foundation; either version 2                   |
| of the License, or (at your option) any later version.                                     |
|                                                                                                                         |
| This program is distributed in the hope that it will be useful,                          |
| but WITHOUT ANY WARRANTY; without even the implied warranty of          |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  |
| GNU General Public License for more details.                                                |
|                                                                                                                          |
| You should have received a copy of the GNU General Public License            |
| along with this program; if not, write to the Free Software                            |
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
+------------------------------------------------------------------------------------------+
*/

package ilias.lucene;

import ilias.utils.ilEncodingException;
import ilias.utils.ilEncodingTransformer;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.StringWriter;


import org.apache.lucene.document.Document;

//import com.anotherbigidea.flash.readers.SWFReader;
//import com.anotherbigidea.flash.readers.TagParser;
//import com.anotherbigidea.flash.writers.SWFTagDumper;

public class ilFlashHandler implements ilDocumentHandler {

    public ilFlashHandler() {
        super();
    }
    public Document getDocument(InputStream is)
            throws ilDocumentHandlerException {
        
        //is = transformStream(is);
        
        return null;
    }
/*
        StringWriter swriter = new StringWriter();
        
        SWFTagDumper dumper = new SWFTagDumper((OutputStream) swriter,false,false);
        TagParser parser = new TagParser(dumper);
        SWFReader reader = new SWFReader(parser,is);
        
        try {
            reader.readFile();
            dumper.flush();
        } 
        catch (IOException e) {
            throw new ilDocumentHandlerException(e.getMessage());
        }

        return null;
    }
*/
    
    public InputStream transformStream(InputStream is) {

        return ilEncodingTransformer.transform(is);
        
    }

}
