IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); file.create(new ByteArrayInputStream(content.getBytes()), true, new NullProgressMonitor());
IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); InputStream is = new ByteArrayInputStream(content.getBytes()); file.create(is, true, new NullProgressMonitor()); is.close();
    private IFile createResource(IPackageFragment pack, String resourceName, String content) throws Exception {	    IPath path = pack.getPath().append(resourceName);	    IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);	    	    file.create(new ByteArrayInputStream(content.getBytes()), true, new NullProgressMonitor());        return file;	}