Here are the examples of the java api class java.io taken from open source projects.
1. CommandTest#run()
Project: basex
File: CommandTest.java
File: CommandTest.java
/** * Command test. * @throws IOException I/O exception */ @Test public final void run() throws IOException { // test xquery IOFile io = new IOFile("test.xq"); no(new Run(io.path())); io.write(token("// li")); no(new Run(io.path())); ok(new CreateDB(NAME, FILE)); ok(new Run(io.path())); io.delete(); // test command script (1) io = new IOFile("test.bxs"); io.write(token("<info/>")); ok(new Run(io.path())); // test command script (2) io = new IOFile("test.bxs"); io.write(token("</>")); no(new Run(io.path())); io.delete(); }