@Test public void exitOnCloseIn() throws DriverException, CloseException { final String input = "{\"content\":\"package foo;\"}\n{\"content\":\"package bar;\"}\n"; final InputStream in = new ByteArrayInputStream(input.getBytes()); final RequestReader reader = new RequestReader(in); final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ResponseWriter writer = new ResponseWriter(out); final Driver driver = new Driver(reader, writer); try { driver.run(); } catch (CloseException ex) { } }
public void run() throws DriverException, CloseException { while (true) { this.processOne(); } }
Driver { public void run() throws DriverException, CloseException { while (true) { this.processOne(); } } }
Driver { public void run() throws DriverException, CloseException { while (true) { this.processOne(); } } Driver(final RequestReader reader, final ResponseWriter writer); }
Driver { public void run() throws DriverException, CloseException { while (true) { this.processOne(); } } Driver(final RequestReader reader, final ResponseWriter writer); void run(); void processOne(); }
Driver { public void run() throws DriverException, CloseException { while (true) { this.processOne(); } } Driver(final RequestReader reader, final ResponseWriter writer); void run(); void processOne();  }