code: def process_line(self, line):
          
          assert isinstance(line, str)
          try:
              self._process.stdin.write(as_binary(line))
              self._process.stdin.write(as_binary('\n'))
              self._process.stdin.flush()
              result = as_unicode(self._process.stdout.readline())
              if result == '':
                  stderr = as_unicode(self._process.stderr.read())
                  raise Exception('EOF encountered while reading stream. Stderr is {0}.'.format(stderr))
              return result
          except Exception:
              self._process.terminate()
              raise
docs: Process a line of data.
          
          Sends the data through the pipe to the process and flush it. Reads a resulting line
          and returns it.
          
          Parameters
          ----------
          
          line: str
              The data sent to process. Make sure it does not contain any newline characters.
  
          Returns
          -------
          str: The line returned by the Java process
          
          Raises
          ------
          Exception
              In case of EOF is encountered.
          IoError
              In case it was impossible to read or write from the subprocess standard input / output.