*/\r
package org.marc4j.samples;\r
\r
-import java.io.FileOutputStream;\r
+import java.io.File;\r
+import java.io.FileInputStream;\r
import java.io.InputStream;\r
import java.io.OutputStream;\r
\r
public class Marc8ToMarcXmlExample {\r
\r
public static void main(String args[]) throws Exception {\r
+ InputStream input; \r
+ if (args.length > 0) \r
+ input = new FileInputStream(new File(args[0]));\r
+ else \r
+ input = ReadMarcExample.class\r
+ .getResourceAsStream("resources/brkrtest.mrc");\r
\r
- InputStream input = ReadMarcExample.class\r
- .getResourceAsStream("resources/brkrtest.mrc");\r
-\r
- OutputStream out = new FileOutputStream("c:/temp/summerland.xml");\r
+ OutputStream out = System.out;\r
\r
MarcReader reader = new MarcStreamReader(input);\r
MarcWriter writer = new MarcXmlWriter(out, true);\r