...
public static BufferedInputStream newInputStream(File file) throws IOException { //noinspection UseOfPropertiesAsHashtable var stream = System.getProperties().get(file); if (stream instanceof BufferedInputStream) return (BufferedInputStream) stream; return new BufferedInputStream(new FileInputStream(file)); }
public static BufferedOutputStream newOutputStream(File file) throws IOException { //noinspection UseOfPropertiesAsHashtable var stream = System.getProperties().get(file); if (stream instanceof BufferedOutputStream) return (BufferedOutputStream) stream; return new BufferedOutputStream(new FileOutputStream(file)); } |
---|
Validating xml
When an adapter reads xml written by FEWS according to its own xsd there is no need for validation, it is an unnecessary step because in the creation process FEWS uses those xsd's and therefore the xml will be valid.
...