Java Code Examples for org.gradle.util.GFileUtils#openInputStream()

The following examples show how to use org.gradle.util.GFileUtils#openInputStream() . 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: DefaultClassDependenciesAnalyzer.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public ClassAnalysis getClassAnalysis(String className, File classFile) {
    FileInputStream input = GFileUtils.openInputStream(classFile);
    try {
        return getClassAnalysis(className, input);
    } catch (IOException e) {
        throw new RuntimeException("Problems loading class analysis for '" + className + "' from file: " + classFile);
    } finally {
        GFileUtils.closeInputStream(input);
    }
}
 
Example 2
Source File: TarFileTree.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public InputStream open() {
    if (read && file != null) {
        return GFileUtils.openInputStream(file);
    }
    if (read || tar.getCurrent() != entry) {
        throw new UnsupportedOperationException(String.format("The contents of %s has already been read.", this));
    }
    read = true;
    return tar;
}
 
Example 3
Source File: TarFileTree.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public InputStream open() {
    if (read && file != null) {
        return GFileUtils.openInputStream(file);
    }
    if (read || tar.getCurrent() != entry) {
        throw new UnsupportedOperationException(String.format("The contents of %s has already been read.", this));
    }
    read = true;
    return tar;
}
 
Example 4
Source File: DefaultClassDependenciesAnalyzer.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public ClassAnalysis getClassAnalysis(String className, File classFile) {
    FileInputStream input = GFileUtils.openInputStream(classFile);
    try {
        return getClassAnalysis(className, input);
    } catch (IOException e) {
        throw new RuntimeException("Problems loading class analysis for '" + className + "' from file: " + classFile);
    } finally {
        GFileUtils.closeInputStream(input);
    }
}
 
Example 5
Source File: TarFileTree.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public InputStream open() {
    if (read && file != null) {
        return GFileUtils.openInputStream(file);
    }
    if (read || tar.getCurrent() != entry) {
        throw new UnsupportedOperationException(String.format("The contents of %s has already been read.", this));
    }
    read = true;
    return tar;
}
 
Example 6
Source File: TarFileTree.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public InputStream open() {
    if (read && file != null) {
        return GFileUtils.openInputStream(file);
    }
    if (read || tar.getCurrent() != entry) {
        throw new UnsupportedOperationException(String.format("The contents of %s has already been read.", this));
    }
    read = true;
    return tar;
}
 
Example 7
Source File: DefaultFileTreeElement.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public InputStream open() {
    return GFileUtils.openInputStream(file);
}
 
Example 8
Source File: DefaultFileTreeElement.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public InputStream open() {
    return GFileUtils.openInputStream(file);
}
 
Example 9
Source File: DefaultFileTreeElement.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public InputStream open() {
    return GFileUtils.openInputStream(file);
}
 
Example 10
Source File: DefaultFileTreeElement.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public InputStream open() {
    return GFileUtils.openInputStream(file);
}