class PageCountServiceImpl implements PageCountService {

    @Override
    @Deprecated
    /**
     * @deprecated use getNumberOfPages(String, File)
     */
    public int getNumberOfPages(String mimeType, byte[] data) throws IOException
    {
        File file = null;
        try
        {
            file = File.createTempFile("arkcase-get-number-of-pages-", null);
            FileUtils.writeByteArrayToFile(file, data);
            return getNumberOfPages(mimeType, file);
        }
        finally
        {
            FileUtils.deleteQuietly(file);
        }
    }

}