Examples of IBeforeParsingCallback


Examples of org.eclipse.e4.xwt.callback.IBeforeParsingCallback

      Element element = null;
      if (stream == null) {
        element = manager.load(input, (IBeforeParsingCallback) options.get(IXWTLoader.BEFORE_PARSING_CALLBACK));
      }
      else {
        IBeforeParsingCallback callback = (IBeforeParsingCallback) options.get(IXWTLoader.BEFORE_PARSING_CALLBACK);
        InputStream inputStream = stream;
        if (callback != null) {
          int size = stream.read();
          byte[] buffer = new byte[size];
          stream.read(buffer);
          String content = new String(buffer);
          stream.close();
          content = callback.onParsing(content);
          inputStream = new ByteArrayInputStream(content.getBytes());
          element = manager.load(stream, input);         
        }
        element = manager.load(inputStream, input);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.