private void ProcessUMLFiles(Object[] packageFragments, StringBuilder sb) throws FileNotFoundException { for (Object obj : packageFragments) { if (obj instanceof File) { File file = (File) obj; if (file.getFileExtension().equals("uml")) { sb.append("<FILE>"); sb.append("<NAME>" + file.getName() + "</NAME>"); sb.append("<SOURCE>"); Scanner s = new Scanner(new FileInputStream(file.getRawLocation().toString())); s.useDelimiter("\\Z"); sb.append(StringEscapeUtils.escapeHtml4(s.next())); s.close(); sb.append("</SOURCE>"); sb.append("</FILE>"); } } } }
public CamelVirtualFile(org.eclipse.core.internal.resources.File file) { super(file.getFullPath(), (Workspace) file.getWorkspace()); }