Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mortbay.util.jmx.* (11)org.mortbay.util.log4j.* (1)

org.mortbay.util: Javadoc index of package org.mortbay.util.


Package Samples:

org.mortbay.util.jmx
org.mortbay.util.log4j

Classes:

Log: Log formatted and tagged messages. Multiple LogSinks instances can be configured, but by default a System.err sink is created. The Log log format is controlled by the LOG_OPTIONS property supplied to the VM. If LOG_OPTIONS is set, then the default output format is controlled by the option characters in the string: t Timestamp log output T Show the log tag name L Show log label (thread, method and file names). s Show indication of stack depth S Stack trace for each output line (VERY VERBOSE) O Place each log one One line of output If the property LOG_CLASSES is set, it is interpreted as a semi-colon-separated ...
TempByteHolder: Temporary buffer for bytes to be used in situations where bytes need to be buffered but total size of data is not known in advance and may potentially be very large. Provides easy way to access small buffered data as byte[] or String. Enables efficient memory-only handling of small data while automatically switching to temporary file storage when data gets too big to fit in memory buffer. It is highly efficient for both byte-per-byte and block I/O. This class is not a FIFO - you can't mix reading and writing infinitely as all data keep being buffered, not just unread data. Mixing reads and writes ...
Code: Coding Standards support. Support for defensive programming Coding defensively as follows: { ... Code.assertTrue(booleanExpression(),"Assert that expression evaluates true"); ... Code.assertEquals(objectA,objectB,"Assert equality"); Code.assertEquals(1,2,"Assert equality"); ... Code.debug("Debug message"); ... Code.debug("Debug message",exception,object); ... Code.warning("warning message"); ... Code.warning("warning message",exception); ... Code.notImplemented(); Code.fail("fatal error"); ... } The debug output can be controlled with java properties: DEBUG - If set, debug output is enabled DEBUG_PATTERNS ...
Password: Password utility class. This utility class gets a password or pass phrase either by: + Password is set as a system property. + The password is prompted for and read from standard input + A program is run to get the password. Passwords that begin with OBF: are de obfuscated. Passwords can be obfuscated by run org.mortbay.util.Password as a main class. Obfuscated password are required if a system needs to recover the full password (eg. so that it may be passed to another system). They are not secure, but prevent casual observation. Passwords that begin with CRYPT: are oneway encrypted with UnixCrypt. ...
ModelMBeanImpl: Model MBean Implementation. This implementation of the JMX Model MBean API is designed to allow easy creation of Model MBeans. From minimal descriptions of operations and attributes, reflection is used to determine the full signature and ResourceBundles are used to determine other meta data. This class is normally used in one of the following patterns: As a base class for a real MBean that contains the actual attributes and operations of the MBean. Such an Object is only usable in a JMX environment. As a proxy MBean to another non-JMX object. The attributes and operations of the proxied object ...
OutputStreamLogSink: A Log sink. This class represents both a concrete or abstract sink of Log data. The default implementation logs to System.err, but other output stream or files may be specified. Currently this Stream only writes in ISO8859_1 encoding. For Other encodings use the less efficient WriterLogSink. If a logFilename is specified, output is sent to that file. If the filename contains "yyyy_mm_dd", the log file date format is used to create the actual filename and the log file is rolled over at local midnight. If append is set, existing logfiles are appended to, otherwise a backup is created with a timestamp. ...
PKCS12Import: This class can be used to import a key/certificate pair from a pkcs12 file into a regular JKS format keystore for use with jetty and other java based SSL applications, etc. usage: java PKCS12Import {pkcs12file} [newjksfile] If you don't supply newjksfile, newstore.jks will be used. This can be an existing JKS keystore. Upon execution, you will be prompted for the password for the pkcs12 keystore as well as the password for the jdk file. After execution you should have a JKS keystore file that contains the private key and certificate that were in the pkcs12 You can generate a pkcs12 file from PEM ...
TestCase: Test Harness and report. Test Harness for production of standard test reports: Test t1 = new Test("All_Pass"); Test t2 = new Test("All_Fail"); t1.check(true,"Boolean check that passes"); t2.check(false,"Boolean check that fails"); t1.checkEquals("Foo","Foo","Object comparison that passes"); t2.checkEquals("Foo","Bar","Object comparison that fails"); t1.checkEquals(1,1,"Long comparison that passes"); t2.checkEquals(1,2,"Long comparison that fails"); t1.checkEquals(1.1,1.1,"Double comparison that passes"); t2.checkEquals(1.1,2.2,"Double comparison that fails"); t1.checkEquals('a','a',"Char comparison ...
LineInput: Fast LineInput InputStream. This buffered InputStream provides methods for reading lines of bytes. The lines can be converted to String or character arrays either using the default encoding or a user supplied encoding. Buffering and data copying are highly optimized, making this an ideal class for protocols that mix character encoding lines with arbitrary byte data (eg HTTP). The buffer size is also the maximum line length in bytes and/or characters. If the byte length of a line is less than the max, but the character length is greater, than then trailing characters are lost. Line termination is ...
LazyList: Lazy List creation. A List helper class that attempts to avoid unneccessary List creation. If a method needs to create a List to return, but it is expected that this will either be empty or frequently contain a single item, then using LazyList will avoid additional object creations by using Collections.EMPTY_LIST or Collections.singletonList where possible. Usage Object lazylist =null; while(loopCondition) { Object item = getItem(); if (item.isToBeAdded()) lazylist = LazyList.add(lazylist,item); } return LazyList.getList(lazylist); An ArrayList of default size is used as the initial LazyList.
ThreadPool: A pool of threads. Avoids the expense of thread creation by pooling threads after their run methods exit for reuse. If the maximum pool size is reached, jobs wait for a free thread. By default there is no maximum pool size. Idle threads timeout and terminate until the minimum number of threads are running. This implementation uses the run(Object) method to place a job on a queue, which is read by the getJob(timeout) method. Derived implementations may specialize getJob(timeout) to obtain jobs from other sources without queing overheads.
Credential: Credentials. The Credential class represents an abstract mechanism for checking authentication credentials. A credential instance either represents a secret, or some data that could only be derived from knowing the secret. Often a Credential is related to a Password via a one way algorithm, so while a Password itself is a Credential, a UnixCrypt or MD5 digest of a a password is only a credential that can be checked against the password. This class includes an implementation for unix Crypt an MD5 digest.
DateCache: Date Format Cache. Computes String representations of Dates and caches the results so that subsequent requests within the same minute will be fast. Only format strings that contain either "ss" or "ss.SSS" are handled. The timezone of the date may be included as an ID with the "zzz" format string or as an offset with the "ZZZ" format string. If consecutive calls are frequently very different, then this may be a little slower than a normal DateFormat.
FileResource: File Resource. Handle resources of implied or explicit file type. This class can check for aliasing in the filesystem (eg case insensitivity). By default this is turned on if the platform does not have the "/" path separator, or it can be controlled with the "org.mortbay.util.FileResource.checkAliases" system parameter. If alias checking is turned on, then aliased resources are treated as if they do not exist, nor can they be created.
UrlEncoded: Handles coding of MIME "x-www-form-urlencoded". This class handles the encoding and decoding for either the query string of a URL or the content of a POST HTTP request. Notes The hashtable either contains String single values, vectors of String or arrays of Strings. This class is only partially synchronised. In particular, simple get operations are not protected from concurrent updates.
StringMap: Map like class of Strings to Objects. This String Map has been optimized for mapping small sets of Strings where the most frequently accessed Strings have been put to the map first. It also has the benefit that it can look up entries by substring or sections of char and byte arrays. This can prevent many String objects from being created just to look up in the map. This map is NOT synchronized.
KeyPairTool: Perform simple private key management for keystores. The current keytool lacks the ability to insert a key/cert pair sourced from another tool. This utility fills that gap. Currently this only works for RSA key/cert pairs. The inverse operation, exporting a keypair to an external format, has been left as an exercise for the reader... :-)
URI: URI Holder. This class assists with the decoding and encoding or HTTP URI's. It differs from the java.net.URL class as it does not provide communications ability, but it does assist with query string formatting. ISO_8859_1 encoding is used by default for % encoded characters. This may be overridden with the org.mortbay.util.URI.charset system property.
Loader: ClassLoader Helper. This helper class allows classes to be loaded either from the Thread's ContextClassLoader, the classloader of the derived class or the system ClassLoader. Usage: public class MyClass { void myMethod() { ... Class c=Loader.loadClass(this.getClass(),classname); ... }
ThreadedServer: Threaded socket server. This class listens at a socket and gives the connections received to a pool of Threads The class is abstract and derived classes must provide the handling for the connections. The properties THREADED_SERVER_MIN_THREADS and THREADED_SERVER_MAX_THREADS can be set to control the number of threads created.
B64Code: Fast B64 Encoder/Decoder as described in RFC 1421. Does not insert or interpret whitespace as described in RFC 1521. If you require this you must pre/post process your data. Note that in a web context the usual case is to not want linebreaks or other white space in the encoded output.
QuotedStringTokenizer: StringTokenizer with Quoting support. This class is a copy of the java.util.StringTokenizer API and the behaviour is the same, except that single and doulbe quoted string values are recognized. Delimiters within quotes are not considered delimiters. Quotes can be escaped with '\'.
ByteArrayISO8859Writer: Byte Array ISO 8859 writer. This class combines the features of a OutputStreamWriter for ISO8859 encoding with that of a ByteArrayOutputStream. It avoids many inefficiencies associated with these standard library classes. It has been optimized for standard ASCII characters.
StringUtil: Fast String Utilities. These string utilities provide both conveniance methods and performance improvements over most standard library versions. The main aim of the optimizations is to avoid object creation unless absolutely required.
LogWriter: A Writer that writes to the Log when it is flushed. For best results wrap with a PrintWriter configured to flush on println() for example PrintWriter out = new PrintWriter(new LogWriter(), true);

Home | Contact Us | Privacy Policy | Terms of Service