results.setRequestMetaData(request.getRequestMetaData());
ByteReader byteReader = new IdentificationRequestByteReaderAdapter(request);
sigFile.runFileIdentification(byteReader);
final int numHits = byteReader.getNumHits();
for (int i = 0; i < numHits; i++) {
FileFormatHit hit = byteReader.getHit(i);
IdentificationResultImpl result = new IdentificationResultImpl();
result.setMimeType(hit.getMimeType());
result.setName(hit.getFileFormatName());
result.setVersion(hit.getFileFormatVersion());
result.setPuid(hit.getFileFormatPUID());
result.setMethod(IdentificationMethod.BINARY_SIGNATURE);
results.addResult(result);
}
results.setFileLength(request.size());
results.setRequestMetaData(request.getRequestMetaData());