Java Code Examples for org.apache.cxf.helpers.FileUtils#delete()

The following examples show how to use org.apache.cxf.helpers.FileUtils#delete() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JAXBDataBinding.java    From cxf with Apache License 2.0 5 votes vote down vote up
private void parseSchemas(SchemaCompiler schemaCompiler) {
    for (String ns : context.getNamespacePackageMap().keySet()) {
        File file = JAXBUtils.getPackageMappingSchemaBindingFile(ns, context.mapPackageName(ns));
        try {
            InputSource ins = new InputSource(file.toURI().toString());
            schemaCompiler.parseSchema(ins);
        } finally {
            FileUtils.delete(file);
        }
    }

    if (context.getPackageName() != null) {
        schemaCompiler.setDefaultPackageName(context.getPackageName());
    }
}
 
Example 2
Source File: CachedOutputStream.java    From cxf with Apache License 2.0 5 votes vote down vote up
private synchronized void deleteTempFile() {
    if (tempFile != null) {
        File file = tempFile;
        tempFile = null;
        FileUtils.delete(file);
    }
}
 
Example 3
Source File: CachedWriter.java    From cxf with Apache License 2.0 5 votes vote down vote up
private synchronized void deleteTempFile() {
    if (tempFile != null) {
        File file = tempFile;
        tempFile = null;
        FileUtils.delete(file);
    }
}