
Untitled
By: a guest on
Oct 17th, 2011 | syntax:
Java | size: 0.42 KB | views:
14 | expires: Never
protected void writeResource(ByteArrayOutputStream baos, String fileName){
ByteArrayInputStream input=new ByteArrayInputStream(baos.toByteArray());
IPath path=this.currentPath.removeLastSegments(1).append(fileName);
IFile file=this.currentProject.getFile(path);
try {
file.create(input, IResource.FORCE, null);
}catch(CoreException ce){
System.out.println(ce.getMessage());
ce.printStackTrace();
}
}