test_class.declarator: out
test_class.modifier: private
test_class.original_string: private InterpreterOutput out;
test_class.type: InterpreterOutput
test_class.var_name: out
test_class.declarator: numAppendEvent
test_class.original_string: int numAppendEvent;
test_class.type: int
test_class.var_name: numAppendEvent
test_class.declarator: numUpdateEvent
test_class.original_string: int numUpdateEvent;
test_class.type: int
test_class.var_name: numUpdateEvent
test_class.file: smart-zeppelin/zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/InterpreterOutputTest.java
test_class.identifier: InterpreterOutputTest
test_class.interfaces: implements InterpreterOutputListener
test_case.body: @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()));
    }
test_case.class_method_signature: InterpreterOutputTest.testFlush()
test_case.full_signature: @Test public void testFlush()
test_case.identifier: testFlush
test_case.invocations: write assertEquals toByteArray getOutputAt assertEquals assertEquals flush assertEquals toByteArray getOutputAt assertEquals assertEquals clear write assertEquals toByteArray getOutputAt assertEquals getType getOutputAt flush assertEquals toByteArray getOutputAt
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFlush()
focal_class.declarator: logger = LoggerFactory.getLogger(InterpreterOutput.class)
focal_class.original_string: Logger logger = LoggerFactory.getLogger(InterpreterOutput.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: NEW_LINE_CHAR = '\n'
focal_class.modifier: private final
focal_class.original_string: private final int NEW_LINE_CHAR = '\n';
focal_class.type: int
focal_class.var_name: NEW_LINE_CHAR
focal_class.declarator: resultMessageOutputs = new LinkedList<>()
focal_class.modifier: private
focal_class.original_string: private List<InterpreterResultMessageOutput> resultMessageOutputs = new LinkedList<>();
focal_class.type: List<InterpreterResultMessageOutput>
focal_class.var_name: resultMessageOutputs
focal_class.declarator: currentOut
focal_class.modifier: private
focal_class.original_string: private InterpreterResultMessageOutput currentOut;
focal_class.type: InterpreterResultMessageOutput
focal_class.var_name: currentOut
focal_class.declarator: resourceSearchPaths = Collections.synchronizedList(new LinkedList<String>())
focal_class.modifier: private
focal_class.original_string: private List<String> resourceSearchPaths = Collections.synchronizedList(new LinkedList<String>());
focal_class.type: List<String>
focal_class.var_name: resourceSearchPaths
focal_class.declarator: buffer = new ByteArrayOutputStream()
focal_class.original_string: ByteArrayOutputStream buffer = new ByteArrayOutputStream();
focal_class.type: ByteArrayOutputStream
focal_class.var_name: buffer
focal_class.declarator: flushListener
focal_class.modifier: private final
focal_class.original_string: private final InterpreterOutputListener flushListener;
focal_class.type: InterpreterOutputListener
focal_class.var_name: flushListener
focal_class.declarator: changeListener
focal_class.modifier: private final
focal_class.original_string: private final InterpreterOutputChangeListener changeListener;
focal_class.type: InterpreterOutputChangeListener
focal_class.var_name: changeListener
focal_class.declarator: size = 0
focal_class.modifier: private
focal_class.original_string: private int size = 0;
focal_class.type: int
focal_class.var_name: size
focal_class.declarator: limit = Constants.ZEPPELIN_INTERPRETER_OUTPUT_LIMIT
focal_class.modifier: public static
focal_class.original_string: public static int limit = Constants.ZEPPELIN_INTERPRETER_OUTPUT_LIMIT;
focal_class.type: int
focal_class.var_name: limit
focal_class.declarator: previousChar = 0
focal_class.original_string: int previousChar = 0;
focal_class.type: int
focal_class.var_name: previousChar
focal_class.declarator: startOfTheNewLine = true
focal_class.original_string: boolean startOfTheNewLine = true;
focal_class.type: boolean
focal_class.var_name: startOfTheNewLine
focal_class.declarator: firstCharIsPercentSign = false
focal_class.original_string: boolean firstCharIsPercentSign = false;
focal_class.type: boolean
focal_class.var_name: firstCharIsPercentSign
focal_class.declarator: truncated = false
focal_class.original_string: boolean truncated = false;
focal_class.type: boolean
focal_class.var_name: truncated
focal_class.file: smart-zeppelin/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOutput.java
focal_class.identifier: InterpreterOutput
focal_class.class_method_signature: InterpreterOutput.InterpreterOutput(InterpreterOutputListener flushListener)
focal_class.full_signature: public  InterpreterOutput(InterpreterOutputListener flushListener)
focal_class.identifier: InterpreterOutput
focal_class.modifiers: public
focal_class.parameters: (InterpreterOutputListener flushListener)
focal_class.signature:  InterpreterOutput(InterpreterOutputListener flushListener)
focal_class.class_method_signature: InterpreterOutput.InterpreterOutput(InterpreterOutputListener flushListener,
                             InterpreterOutputChangeListener listener)
focal_class.full_signature: public  InterpreterOutput(InterpreterOutputListener flushListener,
                             InterpreterOutputChangeListener listener)
focal_class.identifier: InterpreterOutput
focal_class.modifiers: public
focal_class.parameters: (InterpreterOutputListener flushListener,
                             InterpreterOutputChangeListener listener)
focal_class.signature:  InterpreterOutput(InterpreterOutputListener flushListener,
                             InterpreterOutputChangeListener listener)
focal_class.class_method_signature: InterpreterOutput.setType(InterpreterResult.Type type)
focal_class.full_signature: public void setType(InterpreterResult.Type type)
focal_class.identifier: setType
focal_class.modifiers: public
focal_class.parameters: (InterpreterResult.Type type)
focal_class.return: void
focal_class.signature: void setType(InterpreterResult.Type type)
focal_class.class_method_signature: InterpreterOutput.createInterpreterResultMessageOutputListener(
        final int index)
focal_class.full_signature: public InterpreterResultMessageOutputListener createInterpreterResultMessageOutputListener(
        final int index)
focal_class.identifier: createInterpreterResultMessageOutputListener
focal_class.modifiers: public
focal_class.parameters: (
        final int index)
focal_class.return: InterpreterResultMessageOutputListener
focal_class.signature: InterpreterResultMessageOutputListener createInterpreterResultMessageOutputListener(
        final int index)
focal_class.class_method_signature: InterpreterOutput.getCurrentOutput()
focal_class.full_signature: public InterpreterResultMessageOutput getCurrentOutput()
focal_class.identifier: getCurrentOutput
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: InterpreterResultMessageOutput
focal_class.signature: InterpreterResultMessageOutput getCurrentOutput()
focal_class.class_method_signature: InterpreterOutput.getOutputAt(int index)
focal_class.full_signature: public InterpreterResultMessageOutput getOutputAt(int index)
focal_class.identifier: getOutputAt
focal_class.modifiers: public
focal_class.parameters: (int index)
focal_class.return: InterpreterResultMessageOutput
focal_class.signature: InterpreterResultMessageOutput getOutputAt(int index)
focal_class.class_method_signature: InterpreterOutput.size()
focal_class.full_signature: public int size()
focal_class.identifier: size
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int size()
focal_class.class_method_signature: InterpreterOutput.clear()
focal_class.full_signature: public void clear()
focal_class.identifier: clear
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clear()
focal_class.class_method_signature: InterpreterOutput.updateAllResultMessages()
focal_class.full_signature: private void updateAllResultMessages()
focal_class.identifier: updateAllResultMessages
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void updateAllResultMessages()
focal_class.class_method_signature: InterpreterOutput.write(int b)
focal_class.full_signature: @Override public void write(int b)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (int b)
focal_class.return: void
focal_class.signature: void write(int b)
focal_class.class_method_signature: InterpreterOutput.getCurrentOutputForWriting()
focal_class.full_signature: private InterpreterResultMessageOutput getCurrentOutputForWriting()
focal_class.identifier: getCurrentOutputForWriting
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: InterpreterResultMessageOutput
focal_class.signature: InterpreterResultMessageOutput getCurrentOutputForWriting()
focal_class.class_method_signature: InterpreterOutput.write(byte [] b)
focal_class.full_signature: @Override public void write(byte [] b)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (byte [] b)
focal_class.return: void
focal_class.signature: void write(byte [] b)
focal_class.class_method_signature: InterpreterOutput.write(byte [] b, int off, int len)
focal_class.full_signature: @Override public void write(byte [] b, int off, int len)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (byte [] b, int off, int len)
focal_class.return: void
focal_class.signature: void write(byte [] b, int off, int len)
focal_class.class_method_signature: InterpreterOutput.write(File file)
focal_class.full_signature: public void write(File file)
focal_class.identifier: write
focal_class.modifiers: public
focal_class.parameters: (File file)
focal_class.return: void
focal_class.signature: void write(File file)
focal_class.class_method_signature: InterpreterOutput.write(String string)
focal_class.full_signature: public void write(String string)
focal_class.identifier: write
focal_class.modifiers: public
focal_class.parameters: (String string)
focal_class.return: void
focal_class.signature: void write(String string)
focal_class.class_method_signature: InterpreterOutput.write(URL url)
focal_class.full_signature: public void write(URL url)
focal_class.identifier: write
focal_class.modifiers: public
focal_class.parameters: (URL url)
focal_class.return: void
focal_class.signature: void write(URL url)
focal_class.class_method_signature: InterpreterOutput.addResourceSearchPath(String path)
focal_class.full_signature: public void addResourceSearchPath(String path)
focal_class.identifier: addResourceSearchPath
focal_class.modifiers: public
focal_class.parameters: (String path)
focal_class.return: void
focal_class.signature: void addResourceSearchPath(String path)
focal_class.class_method_signature: InterpreterOutput.writeResource(String resourceName)
focal_class.full_signature: public void writeResource(String resourceName)
focal_class.identifier: writeResource
focal_class.modifiers: public
focal_class.parameters: (String resourceName)
focal_class.return: void
focal_class.signature: void writeResource(String resourceName)
focal_class.class_method_signature: InterpreterOutput.toInterpreterResultMessage()
focal_class.full_signature: public List<InterpreterResultMessage> toInterpreterResultMessage()
focal_class.identifier: toInterpreterResultMessage
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<InterpreterResultMessage>
focal_class.signature: List<InterpreterResultMessage> toInterpreterResultMessage()
focal_class.class_method_signature: InterpreterOutput.flush()
focal_class.full_signature: public void flush()
focal_class.identifier: flush
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void flush()
focal_class.class_method_signature: InterpreterOutput.toByteArray()
focal_class.full_signature: public byte[] toByteArray()
focal_class.identifier: toByteArray
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] toByteArray()
focal_class.class_method_signature: InterpreterOutput.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.superclass: extends OutputStream
focal_method.body: public void flush() throws IOException {
      InterpreterResultMessageOutput out = getCurrentOutput();
      if (out != null) {
        out.flush();
      }
    }
focal_method.class_method_signature: InterpreterOutput.flush()
focal_method.full_signature: public void flush()
focal_method.identifier: flush
focal_method.invocations: getCurrentOutput flush
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void flush()