Java 类org.gradle.api.resources.ReadableResource 实例源码

项目:Pushjet-Android    文件:DefaultResourceHandler.java   
public ReadableResource maybeCompressed(Object tarPath) {
    if (tarPath instanceof ReadableResource) {
        return (ReadableResource) tarPath;
    } else {
        return new MaybeCompressedFileResource(fileOperations.getFileResolver().resolveResource(tarPath));
    }
}
项目:Pushjet-Android    文件:MaybeCompressedFileResource.java   
public MaybeCompressedFileResource(ReadableResource resource) {
    String ext = FilenameUtils.getExtension(resource.getURI().toString());

    if (Compression.BZIP2.getSupportedExtensions().contains(ext)) {
        this.resource = new Bzip2Archiver(resource);
    } else if (Compression.GZIP.getSupportedExtensions().contains(ext)) {
        this.resource = new GzipArchiver(resource);
    } else {
        this.resource = resource;
    }
}
项目:Pushjet-Android    文件:DefaultResourceHandler.java   
public ReadableResource maybeCompressed(Object tarPath) {
    if (tarPath instanceof ReadableResource) {
        return (ReadableResource) tarPath;
    } else {
        return new MaybeCompressedFileResource(resolver.resolveResource(tarPath));
    }
}
项目:Pushjet-Android    文件:MaybeCompressedFileResource.java   
public MaybeCompressedFileResource(ReadableResource resource) {
    String ext = FilenameUtils.getExtension(resource.getURI().toString());

    if (Compression.BZIP2.getSupportedExtensions().contains(ext)) {
        this.resource = new Bzip2Archiver(resource);
    } else if (Compression.GZIP.getSupportedExtensions().contains(ext)) {
        this.resource = new GzipArchiver(resource);
    } else {
        this.resource = resource;
    }
}
项目:Reer    文件:UnknownBackingFileReadableResource.java   
public UnknownBackingFileReadableResource(ReadableResource resource) {
    this.resource = resource;
}
项目:Reer    文件:MaybeCompressedFileResource.java   
public ReadableResource getResource() {
    return resource;
}
项目:Pushjet-Android    文件:DefaultResourceHandler.java   
public ReadableResource gzip(Object path) {
    return new GzipArchiver(fileOperations.getFileResolver().resolveResource(path));
}
项目:Pushjet-Android    文件:DefaultResourceHandler.java   
public ReadableResource bzip2(Object path) {
    return new Bzip2Archiver(fileOperations.getFileResolver().resolveResource(path));
}
项目:Pushjet-Android    文件:TarFileTree.java   
public TarFileTree(ReadableResource resource, File tmpDir, Chmod chmod) {
    this.resource = resource;
    this.chmod = chmod;
    String expandDirName = String.format("%s_%s", resource.getBaseName(), HashUtil.createCompactMD5(resource.getURI().toString()));
    this.tmpDir = new File(tmpDir, expandDirName);
}
项目:Pushjet-Android    文件:GzipArchiver.java   
public GzipArchiver(ReadableResource resource) {
    assert resource != null;
    this.resource = resource;
    this.uri = new URIBuilder(resource.getURI()).schemePrefix("gzip:").build();
}
项目:Pushjet-Android    文件:Bzip2Archiver.java   
public Bzip2Archiver(ReadableResource resource) {
    assert resource != null;
    this.resource = resource;
    this.uri = new URIBuilder(resource.getURI()).schemePrefix("bzip2:").build();
}
项目:Pushjet-Android    文件:AbstractFileResolver.java   
public ReadableResource resolveResource(Object path) {
    if (path instanceof ReadableResource) {
        return (ReadableResource) path;
    }
    return new FileResource(resolve(path));
}
项目:Pushjet-Android    文件:MaybeCompressedFileResource.java   
public ReadableResource getResource() {
    return resource;
}
项目:Pushjet-Android    文件:DefaultResourceHandler.java   
public ReadableResource gzip(Object path) {
    return new GzipArchiver(resolver.resolveResource(path));
}
项目:Pushjet-Android    文件:DefaultResourceHandler.java   
public ReadableResource bzip2(Object path) {
    return new Bzip2Archiver(resolver.resolveResource(path));
}
项目:Pushjet-Android    文件:TarFileTree.java   
public TarFileTree(ReadableResource resource, File tmpDir, Chmod chmod) {
    this.resource = resource;
    this.chmod = chmod;
    String expandDirName = String.format("%s_%s", resource.getBaseName(), HashUtil.createCompactMD5(resource.getURI().toString()));
    this.tmpDir = new File(tmpDir, expandDirName);
}
项目:Pushjet-Android    文件:GzipArchiver.java   
public GzipArchiver(ReadableResource resource) {
    assert resource != null;
    this.resource = resource;
    this.uri = new URIBuilder(resource.getURI()).schemePrefix("gzip:").build();
}
项目:Pushjet-Android    文件:Bzip2Archiver.java   
public Bzip2Archiver(ReadableResource resource) {
    assert resource != null;
    this.resource = resource;
    this.uri = new URIBuilder(resource.getURI()).schemePrefix("bzip2:").build();
}
项目:Pushjet-Android    文件:AbstractFileResolver.java   
public ReadableResource resolveResource(Object path) {
    if (path instanceof ReadableResource) {
        return (ReadableResource) path;
    }
    return new FileResource(resolve(path));
}
项目:Pushjet-Android    文件:MaybeCompressedFileResource.java   
public ReadableResource getResource() {
    return resource;
}
项目:gradle-pylizard    文件:MockSourceSet.java   
@Override
public ReadableResource resolveResource(final Object path) {
    return null;
}
项目:Pushjet-Android    文件:FileResolver.java   
ReadableResource resolveResource(Object path);
项目:Pushjet-Android    文件:FileResolver.java   
ReadableResource resolveResource(Object path);