com.zusmart.base.scanner.support.ScannerResultForDirResource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zusmart-base Show documentation
Show all versions of zusmart-base Show documentation
提供基础的工具类及方法类,Logging,Scanner,Buffer,NetWork,Future,Thread
package com.zusmart.base.scanner.support;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import com.zusmart.base.scanner.ScannerResultForResource;
public class ScannerResultForDirResource extends AbstractScannerResult implements ScannerResultForResource {
private final File target;
protected ScannerResultForDirResource(File parent, File target) {
super(target.getName(), target.getPath());
this.target = target;
}
@Override
public boolean isClass() {
return false;
}
@Override
public boolean isResource() {
return true;
}
@Override
public boolean isFromJarFile() {
return false;
}
@Override
public boolean isFromDirFile() {
return true;
}
@Override
public InputStream getInputStream() throws IOException {
return new FileInputStream(this.target);
}
}