@Test public void testFlush() throws IOException { out.write("hello\nworld"); assertEquals("hello\n", new String(out.getOutputAt(0).toByteArray())); assertEquals(1, numAppendEvent); assertEquals(1, numUpdateEvent); out.flush(); assertEquals("hello\nworld", new String(out.getOutputAt(0).toByteArray())); assertEquals(2, numAppendEvent); assertEquals(1, numUpdateEvent); out.clear(); out.write("%html div"); assertEquals("", new String(out.getOutputAt(0).toByteArray())); assertEquals(InterpreterResult.Type.HTML, out.getOutputAt(0).getType()); out.flush(); assertEquals("div", new String(out.getOutputAt(0).toByteArray())); }
public void flush() throws IOException { InterpreterResultMessageOutput out = getCurrentOutput(); if (out != null) { out.flush(); } }
InterpreterOutput extends OutputStream { public void flush() throws IOException { InterpreterResultMessageOutput out = getCurrentOutput(); if (out != null) { out.flush(); } } }
InterpreterOutput extends OutputStream { public void flush() throws IOException { InterpreterResultMessageOutput out = getCurrentOutput(); if (out != null) { out.flush(); } } InterpreterOutput(InterpreterOutputListener flushListener);  InterpreterOutput(InterpreterOutputListener flushListener,
                           InterpreterOutputChangeListener listener); }
InterpreterOutput extends OutputStream { public void flush() throws IOException { InterpreterResultMessageOutput out = getCurrentOutput(); if (out != null) { out.flush(); } } InterpreterOutput(InterpreterOutputListener flushListener);  InterpreterOutput(InterpreterOutputListener flushListener,
                           InterpreterOutputChangeListener listener); void setType(InterpreterResult.Type type); InterpreterResultMessageOutputListener createInterpreterResultMessageOutputListener(
      final int index); InterpreterResultMessageOutput getCurrentOutput(); InterpreterResultMessageOutput getOutputAt(int index); int size(); void clear(); @Override void write(int b); @Override void write(byte [] b); @Override void write(byte [] b, int off, int len); void write(File file); void write(String string); void write(URL url); void addResourceSearchPath(String path); void writeResource(String resourceName); List<InterpreterResultMessage> toInterpreterResultMessage(); void flush(); byte[] toByteArray(); @Override void close(); }
InterpreterOutput extends OutputStream { public void flush() throws IOException { InterpreterResultMessageOutput out = getCurrentOutput(); if (out != null) { out.flush(); } } InterpreterOutput(InterpreterOutputListener flushListener);  InterpreterOutput(InterpreterOutputListener flushListener,
                           InterpreterOutputChangeListener listener); void setType(InterpreterResult.Type type); InterpreterResultMessageOutputListener createInterpreterResultMessageOutputListener(
      final int index); InterpreterResultMessageOutput getCurrentOutput(); InterpreterResultMessageOutput getOutputAt(int index); int size(); void clear(); @Override void write(int b); @Override void write(byte [] b); @Override void write(byte [] b, int off, int len); void write(File file); void write(String string); void write(URL url); void addResourceSearchPath(String path); void writeResource(String resourceName); List<InterpreterResultMessage> toInterpreterResultMessage(); void flush(); byte[] toByteArray(); @Override void close(); static int limit; }