public class PDFNetInternalTools
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
e_callback |
static int |
e_console |
static int |
e_debug |
static int |
e_debugger |
static int |
e_disabled |
static int |
e_disk |
static int |
e_error |
static int |
e_fatal |
static int |
e_info |
static int |
e_trace |
static int |
e_warning |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkDocIntegrity(PDFDoc doc)
Ensure that a document is well formed, and that its in-memory representation matches its backing filter.
|
static boolean |
configureLogFromJsonString(java.lang.String config_string)
Attempt to configure the logging ssytem with a json configuration file.
|
static void |
disableLogBackend(int backend)
Disable a particular log backend.
|
static boolean |
enableLogBackend(int backend)
Enable a particular log backend.
|
static java.lang.String |
getDefaultConfigFile()
Get the default configuration json file.
|
static java.lang.String |
getPDFViewTileSummary()
Get a summary of the held tiles of all the know instances of PDFViewImplTiled.
|
static boolean |
isLogSystemAvailable()
Find out whether the logging system is built into this particular binary.
|
static void |
logMessage(int threshold,
java.lang.String message,
java.lang.String filename,
int line_number)
Log a message to a particular stream using the core logging routines.
|
static void |
logStreamMessage(int threshold,
java.lang.String stream,
java.lang.String message,
java.lang.String filename,
int line_number)
Log a message to a particular stream using the core logging routines.
|
static java.lang.String |
runUniversalConversionTests(java.lang.String path_with_docs)
Run universal conversion tests on all the documents found in the given path.
|
static void |
setAnalyticsHandler(AnalyticsHandlerCallback handler)
Set the current analytics handler.
|
static void |
setAssertHandler(AssertHandlerCallback handler)
Set the current assert handler.
|
static void |
setCutoffLogThreshold(int threshold)
set the global log cutoff.
|
static void |
setDefaultLogThreshold(int threshold)
set the log level for streams that do not otherwise have their level set.
|
static boolean |
setLogFileName(java.lang.String log_filename)
Set the filename to log to.
|
static boolean |
setLogLocation(java.lang.String log_directory,
java.lang.String log_filename)
Set the directory and filename to log to.
|
static void |
setThresholdForLogStream(java.lang.String stream_name,
int stream_threshold)
set the log level for some particular stream.
|
public static final int e_debugger
public static final int e_disk
public static final int e_callback
public static final int e_console
public static final int e_trace
public static final int e_debug
public static final int e_info
public static final int e_warning
public static final int e_error
public static final int e_fatal
public static final int e_disabled
public static boolean isLogSystemAvailable() throws PDFNetException
PDFNetException
public static boolean configureLogFromJsonString(java.lang.String config_string) throws PDFNetException
config_string
- -- Configuration Data in json form.PDFNetException
public static java.lang.String getDefaultConfigFile() throws PDFNetException
PDFNetException
public static java.lang.String runUniversalConversionTests(java.lang.String path_with_docs) throws PDFNetException
path_with_docs
- -- The path to search within for documents to convert.PDFNetException
public static void logMessage(int threshold, java.lang.String message, java.lang.String filename, int line_number) throws PDFNetException
threshold
- -- the importance of this log message.message
- -- the message to be logged.filename
- -- the filename from which the log message originates.line_number
- -- the line number from which the log message originates.PDFNetException
public static void logStreamMessage(int threshold, java.lang.String stream, java.lang.String message, java.lang.String filename, int line_number) throws PDFNetException
threshold
- -- the importance of this log message.stream
- -- the name of the stream to which the message belongs (a category label).message
- -- the message to be logged.filename
- -- the filename from which the log message originates.line_number
- -- the line number from which the log message originates.PDFNetException
public static boolean setLogLocation(java.lang.String log_directory, java.lang.String log_filename) throws PDFNetException
log_directory
- -- the path of the directory to log into.log_filename
- -- the name of the file to log into.PDFNetException
public static boolean setLogFileName(java.lang.String log_filename) throws PDFNetException
log_filename
- -- the name of the file to log into.PDFNetException
public static void setThresholdForLogStream(java.lang.String stream_name, int stream_threshold) throws PDFNetException
stream_name
- -- the name of the stream you wish to configure.stream_threshold
- -- the stream threshold. Entries with a priority greater than or equal to this level will be logged.PDFNetException
public static void setDefaultLogThreshold(int threshold) throws PDFNetException
threshold
- -- Entries with a priority greater than or equal to this level will be logged.PDFNetException
public static void setCutoffLogThreshold(int threshold) throws PDFNetException
threshold
- -- The threshold. Entries with a priority greater than or equal to this level will be logged.PDFNetException
public static boolean enableLogBackend(int backend) throws PDFNetException
backend
- -- The log backend to enable.PDFNetException
public static void disableLogBackend(int backend) throws PDFNetException
backend
- -- The log backend to disable.PDFNetException
public static void setAnalyticsHandler(AnalyticsHandlerCallback handler) throws PDFNetException
handler
- -- an instance of an analytics handler.PDFNetException
public static void setAssertHandler(AssertHandlerCallback handler) throws PDFNetException
handler
- -- an instance of an assert handler.PDFNetException
public static java.lang.String getPDFViewTileSummary() throws PDFNetException
PDFNetException
public static boolean checkDocIntegrity(PDFDoc doc) throws PDFNetException
doc
- -- The document to check.PDFNetException