Top Description Fields Constructors Methods
sun.security.util

public Class Debug

extends Object
Class Inheritance
Imports
java.io.PrintStream, java.math.BigInteger, java.util.HexFormat, .Locale, java.util.regex.Pattern, .Matcher, sun.security.action.GetPropertyAction

A utility class for debugging.
Author
Roland Schemers

Field Summary

Modifier and TypeField and Description
private static String
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Debug
getInstance(String option)

Get a Debug object corresponding to whether or not the given option is set.

public static Debug
getInstance(String option, String prefix)

Get a Debug object corresponding to whether or not the given option is set.

public PrintStream
getPrintStream()

PrintStream for debug methods.

public static void
Help()

public static boolean
isOn(String option)

True if the system property "security.debug" contains the string "option".

public static boolean
isVerbose()

Check if verbose messages is enabled for extra debugging.

private static String
marshal(String args)

change a string into lower case except permission classes and URLs.

public void
println(String message)

print a message to stderr that is prefixed with the prefix created from the call to getInstance.

public void
println(Object obj, String message)

print a message to stderr that is prefixed with the prefix created from the call to getInstance and obj.

public void
println()

print a blank line to stderr that is prefixed with the prefix.

public static void
println(String prefix, String message)

print a message to stderr that is prefixed with the prefix.

public static String
toHexString(BigInteger b)

return a hexadecimal printed representation of the specified BigInteger object.

public static String
toString(byte[] b)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

argsback to summary
private static String args
prefixback to summary
private String prefix

Constructor Detail

Debugback to summary
public Debug()

Method Detail

getInstanceback to summary
public static Debug getInstance(String option)

Get a Debug object corresponding to whether or not the given option is set. Set the prefix to be the same as option.

getInstanceback to summary
public static Debug getInstance(String option, String prefix)

Get a Debug object corresponding to whether or not the given option is set. Set the prefix to prefix.

getPrintStreamback to summary
public PrintStream getPrintStream()

PrintStream for debug methods. Currently, only System.err is supported.

Helpback to summary
public static void Help()
isOnback to summary
public static boolean isOn(String option)

True if the system property "security.debug" contains the string "option".

isVerboseback to summary
public static boolean isVerbose()

Check if verbose messages is enabled for extra debugging.

marshalback to summary
private static String marshal(String args)

change a string into lower case except permission classes and URLs.

printlnback to summary
public void println(String message)

print a message to stderr that is prefixed with the prefix created from the call to getInstance.

printlnback to summary
public void println(Object obj, String message)

print a message to stderr that is prefixed with the prefix created from the call to getInstance and obj.

printlnback to summary
public void println()

print a blank line to stderr that is prefixed with the prefix.

printlnback to summary
public static void println(String prefix, String message)

print a message to stderr that is prefixed with the prefix.

toHexStringback to summary
public static String toHexString(BigInteger b)

return a hexadecimal printed representation of the specified BigInteger object. the value is formatted to fit on lines of at least 75 characters, with embedded newlines. Words are separated for readability, with eight words (32 bytes) per line.

toStringback to summary
public static String toString(byte[] b)