Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public InterpreterResult interpret(String q, InterpreterContext arg1) {
- // test SVG return
- File svgSample = new File(FULLPATH+"/resources/resultSample.svg");
- StringBuffer buf = new StringBuffer();
- try (LineNumberReader reader = new LineNumberReader(new FileReader(svgSample))) {
- String line = null;
- while ((line = reader.readLine()) != null) buf.append(line);
- } catch (IOException e) {
- return new InterpreterResult(InterpreterResult.Code.ERROR, String.format("Error svg", q, results));
- }
- return new InterpreterResult(InterpreterResult.Code.SUCCESS, InterpreterResult.Type.SVG, buf.toString());
- }
Advertisement
Add Comment
Please, Sign In to add comment