Commit 8285cdac authored by Fabien Triolet's avatar Fabien Triolet
Browse files

Moved creation of handlers from broadcast to TDispatcher, readfile sends an...

Moved creation of handlers from broadcast to TDispatcher, readfile sends an empty document when the file to read doesn't exist
parent f9d71318
/**
* $Id: broadcast.java,v 1.3 2002-08-30 07:41:02 triolet Exp $
* $Id: broadcast.java,v 1.4 2002-10-16 08:11:11 triolet Exp $
*
* Transmorpher
*
......@@ -51,7 +51,6 @@ public final class broadcast extends TDispatcher {
/** the constructor */
public broadcast(String[] pIn, String[] pOut,Parameters pParam){
super(pIn,pOut,pParam);
contentHandlers = new ContentHandler[iNbOut];
}
/** the start element method of content handler interface */
......
/**
* $Id: readfile.java,v 1.8 2002-09-20 06:51:36 triolet Exp $
* $Id: readfile.java,v 1.9 2002-10-16 08:11:11 triolet Exp $
*
* Transmorpher
*
......@@ -103,6 +103,7 @@ public final class readfile extends TReader {
} //end proc
public void read()throws IOException,SAXException{
try{
InputSource inSource;
if (iFilename !=null){
if (iFilename.startsWith("http://")){
......@@ -122,7 +123,13 @@ public final class readfile extends TReader {
}
else
iReader.parse(standardInput);
}
}
catch(IOException e){
System.err.println("File : "+iFilename +" can't be found.");
iReader.getContentHandler().startDocument();
iReader.getContentHandler().endDocument();
}
}
/**
* Begins the parse of a file. This method is called inside a repeat . At each loop, file is changed.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment