com.pdfunit

## Class AssertThat

- java.lang.Object
- - com.pdfunit.AssertThat

-     @DoNotObfuscate
      public final class AssertThat
      extends java.lang.Object

  This is the entry class of the testing framework PDFUnit. The PDF documents are read physically and an instance of this class is returned.
  Since:
    2016.05
  Author:
    Carsten Siedentop, January 2016

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `VERSION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AssertThat()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DocumentValidator` | `document(byte[] pdfAsBytes)` Loading a PDF document from a byte array representing a PDF document.
    `static DocumentValidator` | `document(byte[] pdfAsBytes, java.lang.String password)` Loading an encrypted PDF document from a byte array representing a PDF document.
    `static DocumentValidator` | `document(java.io.File file)` Loading a PDF document from a file.
    `static DocumentValidator` | `document(java.io.File file, java.lang.String password)` Loading an encrypted PDF document from a file.
    `static DocumentValidator` | `document(java.io.InputStream stream)` Loading a PDF document from an input stream.
    `static DocumentValidator` | `document(java.io.InputStream stream, java.lang.String password)` Loading an encrypted PDF document from an input stream.
    `static DocumentValidator` | `document(java.lang.String filename)` Loading a PDF document from a file.
    `static DocumentValidator` | `document(java.lang.String filename, java.lang.String password)` Loading an encrypted PDF document from a file.
    `static DocumentValidator` | `document(java.net.URL url)` Loading a PDF document from an URL.
    `static DocumentValidator` | `document(java.net.URL url, java.lang.String password)` Loading an encrypted PDF document from an URL.
    `static FolderValidator` | `eachDocument()` Preparing to load all PDF documents from a folder.
    `static MultiDocumentValidator` | `eachDocument(java.io.File[] files)` Loading an array of PDF documents.
    `static MultiDocumentValidator` | `eachDocument(java.io.File[] files, java.lang.String ownerPassword)` Loading an array of PDF documents, each having the same password.
    `static MultiDocumentValidator` | `eachDocument(java.io.InputStream[] streams)` Loading an array of PDF documents.
    `static MultiDocumentValidator` | `eachDocument(java.io.InputStream[] streams, java.lang.String ownerPassword)` Loading an array of PDF documents, each having the same password.
    `static MultiDocumentValidator` | `eachDocument(java.lang.String[] fileNames)` Loading an array of PDF documents.
    `static MultiDocumentValidator` | `eachDocument(java.lang.String[] fileNames, java.lang.String ownerPassword)` Loading an array of PDF documents, each having the same password.
    `static MultiDocumentValidator` | `eachDocument(java.net.URL[] urls)` Loading an array of PDF documents.
    `static MultiDocumentValidator` | `eachDocument(java.net.URL[] urls, java.lang.String ownerPassword)` Loading an array of PDF documents, each having the same password.
    `static java.lang.String` | `installationIsClean(java.lang.String filename)` Verifying that needed classes and files can be found on the classpath.
    `static java.lang.String` | `installationIsClean(java.lang.String filename, boolean verbose)` Verifying that needed classes and files can be found on the classpath.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### VERSION

          public static final java.lang.String VERSION

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AssertThat

          public AssertThat()

  - ### Method Detail

    - #### document

          @Guarded
          public static final DocumentValidator document(java.lang.String filename)

      Loading a PDF document from a file.

    - #### document

          @Guarded
          public static final DocumentValidator document(java.io.File file)

      Loading a PDF document from a file.

    - #### document

          @Guarded
          public static final DocumentValidator document(java.lang.String filename,
                                           java.lang.String password)

      Loading an encrypted PDF document from a file.

    - #### document

          @Guarded
          public static final DocumentValidator document(java.io.File file,
                                           java.lang.String password)

      Loading an encrypted PDF document from a file.

    - #### document

          @Guarded
          public static final DocumentValidator document(byte[] pdfAsBytes)

      Loading a PDF document from a byte array representing a PDF document.

    - #### document

          @Guarded
          public static final DocumentValidator document(byte[] pdfAsBytes,
                                           java.lang.String password)

      Loading an encrypted PDF document from a byte array representing a PDF document.

    - #### document

          @Guarded
          public static final DocumentValidator document(java.net.URL url)

      Loading a PDF document from an URL.

    - #### document

          @Guarded
          public static final DocumentValidator document(java.io.InputStream stream)

      Loading a PDF document from an input stream.

    - #### document

          @Guarded
          public static final DocumentValidator document(java.net.URL url,
                                           java.lang.String password)

      Loading an encrypted PDF document from an URL.

    - #### document

          @Guarded
          public static final DocumentValidator document(java.io.InputStream stream,
                                           java.lang.String password)

      Loading an encrypted PDF document from an input stream.

    - #### eachDocument

          public static final FolderValidator eachDocument()

      Preparing to load all PDF documents from a folder. This method does not work recursive.

    - #### eachDocument

          @Guarded
          public static final MultiDocumentValidator eachDocument(java.lang.String[] fileNames)

      Loading an array of PDF documents.

    - #### eachDocument

          @Guarded
          public static final MultiDocumentValidator eachDocument(java.io.File[] files)

      Loading an array of PDF documents.

    - #### eachDocument

          @Guarded
          public static final MultiDocumentValidator eachDocument(java.io.InputStream[] streams)

      Loading an array of PDF documents.

    - #### eachDocument

          @Guarded
          public static final MultiDocumentValidator eachDocument(java.net.URL[] urls)

      Loading an array of PDF documents.

    - #### eachDocument

          @Guarded
          public static final MultiDocumentValidator eachDocument(java.lang.String[] fileNames,
                                                    java.lang.String ownerPassword)

      Loading an array of PDF documents, each having the same password.

    - #### eachDocument

          @Guarded
          public static final MultiDocumentValidator eachDocument(java.io.File[] files,
                                                    java.lang.String ownerPassword)

      Loading an array of PDF documents, each having the same password.

    - #### eachDocument

          @Guarded
          public static final MultiDocumentValidator eachDocument(java.io.InputStream[] streams,
                                                    java.lang.String ownerPassword)

      Loading an array of PDF documents, each having the same password.

    - #### eachDocument

          @Guarded
          public static final MultiDocumentValidator eachDocument(java.net.URL[] urls,
                                                    java.lang.String ownerPassword)

      Loading an array of PDF documents, each having the same password.

    - #### installationIsClean

          @Guarded
          public static java.lang.String installationIsClean(java.lang.String filename)
                                                      throws java.io.FileNotFoundException,
                                                             javax.xml.transform.TransformerException,
                                                             org.verifyinstallation.VIPException

      Verifying that needed classes and files can be found on the classpath. The created filenames are derived from the input file.
      Throws:
        `java.io.FileNotFoundException`
        `javax.xml.transform.TransformerException`
        `org.verifyinstallation.VIPException`

    - #### installationIsClean

          @Guarded
          public static java.lang.String installationIsClean(java.lang.String filename,
                                                     boolean verbose)
                                                      throws java.io.FileNotFoundException,
                                                             javax.xml.transform.TransformerException,
                                                             org.verifyinstallation.VIPException

      Verifying that needed classes and files can be found on the classpath. The created filenames are derived from the input file. If the verbose flag is set to true a message is printed to System.out.
      Throws:
        `java.io.FileNotFoundException`
        `javax.xml.transform.TransformerException`
        `org.verifyinstallation.VIPException`

Copyright (C) PDFUnit.com. See here for license.