org.owasp.orizon.ident
Class FormatIdentification

java.lang.Object
  extended by org.owasp.orizon.ident.FormatIdentification

public class FormatIdentification
extends java.lang.Object

Static helper class that tries to identify the file format for a given file or byte array representing the first bytes of a file.

Usage

 FormatDescription desc = FormatIdentification.identify(new File("testfile.zip"));
 if (desc != null) {
   System.out.println(desc.getShortName());
 }
 

Author:
Marco Schmidt

Method Summary
static FormatDescription identify(byte[] data)
           
static FormatDescription identify(java.io.File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

identify

public static FormatDescription identify(byte[] data)

identify

public static FormatDescription identify(java.io.File file)