code: public static int getBOMType(File file)
              throws IOException
      {
          FileInputStream fIn = null;
  
          try
          {
              fIn = new FileInputStream( file );
              byte[] buff = new byte[MAXBOMBYTES];
              int read = fIn.read( buff );
              return getBOMType( buff, read );
          }
          finally
          {
              IOUtil.closeQuietly(  fIn );
          }
      }
docs: <p>getBOMType.</p>
  
  @param file a {@link java.io.File} object.
  @return a int.
  @throws java.io.IOException if any.