/** * Constructs a new identification request. * @param metaData the metaData about the binary. * @param identifier the request's identifier */ public FileSystemIdentificationRequest(final RequestMetaData metaData, final RequestIdentifier identifier) { this.identifier = identifier; requestMetaData = metaData; size = metaData.getSize(); fileName = metaData.getName(); extension = ResourceUtils.getExtension(fileName); }
/** * {@inheritDoc} */ @Override public final IdentificationRequest<File> newRequest(RequestMetaData metaData, RequestIdentifier identifier) { return new FileSystemIdentificationRequest(metaData, identifier); }
public ByteArrayIdentificationRequest(RequestMetaData metaData, RequestIdentifier identifier, byte[] data ) { this.metaData = metaData; this.identifier = identifier; // Set up the byte array based on the this.data = data; this.size = data.length; this.byteArray = new CachedByteArray(data, 0); //cachedBinary.setSourceFile(null); }
@Override public IdentificationRequest<InputStream> newRequest(RequestMetaData metaData, RequestIdentifier identifier) { return new ISOImageIdentificationRequest(metaData, identifier, getTempDirLocation()); } }
@Override public IdentificationRequest<InputStream> newRequest(RequestMetaData metaData, RequestIdentifier identifier) { return new BZipIdentificationRequest(metaData, identifier, getTempDirLocation()); } }
@Override public byte getByte(long position) { return byteArray.readByte(position); }
/** * {@inheritDoc} */ @Override public final IdentificationRequest newRequest(RequestMetaData metaData, RequestIdentifier identifier) { final IdentificationRequest request = new WebArchiveEntryIdentificationRequest(metaData, identifier, getTempDirLocation()); return request; }
/** * Constructs a new identification request. * @param metaData the metaData about the binary. * @param identifier the request's identifier */ public FileSystemIdentificationRequest(final RequestMetaData metaData, final RequestIdentifier identifier) { this.identifier = identifier; requestMetaData = metaData; size = metaData.getSize(); fileName = metaData.getName(); extension = ResourceUtils.getExtension(fileName); }
/** * {@inheritDoc} */ @Override public final IdentificationRequest<Path> newRequest(RequestMetaData metaData, RequestIdentifier identifier) { return new FileSystemIdentificationRequest(metaData, identifier); }
/** * @param metaData the request meta data * @param identifier the request identifier * @param tempDir the location to write temp files. */ public WebArchiveEntryIdentificationRequest(RequestMetaData metaData, RequestIdentifier identifier, File tempDir) { this.identifier = identifier; this.size = metaData.getSize(); this.fileName = metaData.getName(); this.extension = ResourceUtils.getExtension(fileName); this.tempDir = tempDir; this.requestMetaData = metaData; }
/** * * @param metaData m * @param identifier i * @param tempDirLocation t */ public SevenZipEntryIdentificationRequest(RequestMetaData metaData, RequestIdentifier identifier, File tempDirLocation) { this.identifier = identifier; this.requestMetaData = metaData; this.size = requestMetaData.getSize(); this.tempDir = tempDirLocation; fileName = metaData.getName(); extension = ResourceUtils.getExtension(fileName); }
/** * @param metaData the request meta data * @param identifier the request identifier * @param tempDir the location to write temp files. */ public WebArchiveEntryIdentificationRequest(RequestMetaData metaData, RequestIdentifier identifier, Path tempDir) { this.identifier = identifier; this.size = metaData.getSize(); this.fileName = metaData.getName(); this.extension = ResourceUtils.getExtension(fileName); this.tempDir = tempDir; this.requestMetaData = metaData; }
/** * @param requestMetaData requestMetaData. * @param identifier RequestIdentifier. * @param tempDir Fat files are read into buffer and written to temp file. */ public FatFileIdentificationRequest(RequestMetaData requestMetaData, RequestIdentifier identifier, final Path tempDir) { this.requestMetaData = requestMetaData; this.identifier = identifier; size = requestMetaData.getSize(); fileName = requestMetaData.getName(); this.tempDir = tempDir; extension = ResourceUtils.getExtension(fileName); }
/** * * @param metaData m * @param identifier i * @param tempDirLocation t */ public SevenZipEntryIdentificationRequest(final RequestMetaData metaData, final RequestIdentifier identifier, final Path tempDirLocation) { this.identifier = identifier; this.requestMetaData = metaData; this.size = requestMetaData.getSize(); this.tempDir = tempDirLocation; fileName = metaData.getName(); extension = ResourceUtils.getExtension(fileName); }
/** * Create new identification request instance. * @param requestMetaData a * @param identifier a * @param tempDir a */ public RarIdentificationRequest(final RequestMetaData requestMetaData, final RequestIdentifier identifier, final Path tempDir) { this.fileName = requestMetaData.getName(); this.extension = ResourceUtils.getExtension(fileName); this.requestMetaData = requestMetaData; this.identifier = identifier; this.requestMetaData.getSize(); this.tempDir = tempDir; this.size = requestMetaData.getSize(); }
/** * Constructs a new Tar file resource. * @param metaData the request meta data * @param identifier the request identifier * @param tempDir the location to write temp files. */ public TarEntryIdentificationRequest(final RequestMetaData metaData, final RequestIdentifier identifier, final Path tempDir) { this.identifier = identifier; size = metaData.getSize(); fileName = metaData.getName(); extension = ResourceUtils.getExtension(fileName); this.tempDir = tempDir; this.requestMetaData = metaData; }
/** * Constructs a new Tar file resource. * @param metaData the request meta data * @param identifier the request identifier * @param tempDir the location to write temp files. */ public TarEntryIdentificationRequest(RequestMetaData metaData, RequestIdentifier identifier, File tempDir) { this.identifier = identifier; size = metaData.getSize(); fileName = metaData.getName(); extension = ResourceUtils.getExtension(fileName); this.tempDir = tempDir; this.requestMetaData = metaData; }
/** * Create new identification request instance. * @param requestMetaData a * @param identifier a * @param tempDir a */ public RarIdentificationRequest(RequestMetaData requestMetaData, RequestIdentifier identifier, File tempDir) { this.fileName = requestMetaData.getName(); this.extension = ResourceUtils.getExtension(fileName); this.requestMetaData = requestMetaData; this.identifier = identifier; this.requestMetaData.getSize(); this.tempDir = tempDir; this.size = requestMetaData.getSize(); }
/** * Constructs a new Zip file resource. * @param metaData meta data about the request * @param identifier request identifier * @param tempDir the location to write temp files. */ public ZipEntryIdentificationRequest(RequestMetaData metaData, RequestIdentifier identifier, File tempDir) { this.identifier = identifier; this.size = metaData.getSize(); this.fileName = metaData.getName(); this.extension = ResourceUtils.getExtension(fileName); this.tempDir = tempDir; this.requestMetaData = metaData; }
/** * Constructs a new Zip file resource. * @param metaData meta data about the request * @param identifier request identifier * @param tempDir the location to write temp files. */ public ZipEntryIdentificationRequest(final RequestMetaData metaData, final RequestIdentifier identifier, final Path tempDir) { this.identifier = identifier; this.size = metaData.getSize(); this.fileName = metaData.getName(); this.extension = ResourceUtils.getExtension(fileName); this.tempDir = tempDir; this.requestMetaData = metaData; }