public abstract class ITextTest extends Object
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
LOGGER |
org.junit.rules.Timeout |
testTimeout |
Constructor and Description |
---|
ITextTest() |
Modifier and Type | Method and Description |
---|---|
static void |
createDestinationFolder(String path)
Creates a folder with a given path, including all necessary nonexistent parent directories.
|
static void |
createOrClearDestinationFolder(String path)
Creates a directory with given path if it does not exist and clears the contents of the directory in case it exists.
|
protected String |
createStringByEscaped(byte[] bytes) |
static void |
deleteDirectory(String path)
Removes the directory with given path along with its content including all the subdirectories.
|
protected byte[] |
readFile(String filename) |
static void |
removeCryptographyRestrictions()
Due to import control restrictions by the governments of a few countries, the encryption libraries shipped by default with the Java SDK restrict the length, and as a result the strength, of encryption keys.
|
static void |
restoreCryptographyRestrictions()
By using this method we restore cryptography restrictions via reflection.
|
protected final org.slf4j.Logger LOGGER
public org.junit.rules.Timeout testTimeout
public static void createDestinationFolder(String path)
path
- the path of the folder to create
public static void createOrClearDestinationFolder(String path)
path
- the path of the directory to be created/cleared
public static void deleteDirectory(String path)
path
- the path of the directory to be removed
public static void removeCryptographyRestrictions()
public static void restoreCryptographyRestrictions()
removeCryptographyRestrictions()
.
protected byte[] readFile(String filename) throws IOException
IOException
protected String createStringByEscaped(byte[] bytes)
Copyright © 1998–2018 iText Group NV. All rights reserved.