com.protomatter.util |
A collection of utility classes.
Error messages used as part of selected classes can be
generated in different languages. Simply add a new resource
(named com/protomatter/util/Resources) to your classpath
for the new language. For instance, to add French error
messages, you would copy the existing file
com/protomatter/util/Resources.properties
and make a new file called
com/protomatter/util/Resources_fr.properties
and place it in the CLASSPATH. Please see the
JavaDoc for the java.util.ResourceBundle class
for more information.
|
Java Source File Name | Type | Comment |
Base64.java | Class | Base64 encoder/decoder. |
BasicAuthUtil.java | Class | A utility class that provides methods for checking and
requiring basic authentication in servlets. |
BlockingQueue.java | Class | A thread-blocking queue. |
ByteDisplay.java | Class | A binary data printer. |
Cache.java | Interface | A generic interface for caches. |
ChainedException.java | Class | An exception which chains another exception. |
ChainedRuntimeException.java | Class | A runtime exception which chains another exception. |
DatabaseUtil.java | Class | Database-related utility class. |
Debug.java | Class | A simple hierarchical namespace utility.
Maintains a static list of names and/or patterns
to match names. |
ExpiringSoftReferenceCache.java | Class | A cache that uses soft references and will also expire
cache values after a given period of time. |
JDK14StackTraceUtil.java | Class | A utility class for parsing stack traces. |
MalformedMIMEAttachmentException.java | Class | An exception thrown when a MIME attachement is improperly formatted. |
MessageConstants.java | Class | Constants for messages loaded from resource bundles. |
MIMEAttachment.java | Class | This class is used in conjunction with the MIMEMessage class
to make a multipart MIME message. |
MIMEException.java | Class | An exception pertaining to MIME messages. |
MIMEMessage.java | Class | A MIME encoded message.
This is basically a collection of MIMEAttachment objects. |
Mutex.java | Class | A mutex. |
MutexObject.java | Class | This is the "meat" of the Mutex. |
MutexToken.java | Class | A token showing ownership of a Mutex lock. |
OpTimer.java | Class | A benchmarking utility class. |
OpTimerUtil.java | Class | A utility class for parsing log files with timer traces.
Run this class as follows for a usage display:
java com.protomatter.util.OpTimerUtil
Example output looks like the following:
Reading file "file.txt"
Parsed 2843 lines.
Found 1 unique timer names
Found 2843 timer traces
Timing information:
---------------------------------------------------------------------------
OpTimer: My timer
count = 2,843
total = 222,946 ms
min = 0 ms
max = 360 ms
median = 65 ms
average = 78.42 ms
Histogram:
Median: ------------v
Average: --------------v
132 o o
o ooo o o
ooooo o ooo o
88 oooooooo oooooo
ooooooooooooooooooo
ooooooooooooooooooooo
44 ooooooooooooooooooooooooo o
ooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooo o
count 0 ooooooooooooooooooooooooooooooooooooooooooooooooooooo ooooooo oo o
| | | | | | |
millis 0 58 116 175 233 291 349
The graph axes are automatically scaled for the data being parsed. |
ProtoProperties.java | Class | A Properties object that allows in-line file imports. |
ProtoStringTokenizer.java | Class | A string tokenizer. |
SoftReferenceCache.java | Class | A cache that uses soft references. |
StackTraceInfo.java | Class | A utility class describing a position in a method call stack. |
StackTraceUtil.java | Class | A utility class for parsing stack traces.
Determining the stack information at runtime
is a relatively expensive operation. |
StringUtil.java | Class | Utility methods for manipulating strings. |
UtilResources.java | Class | Constants for messages loaded from resource bundles. |
WorkQueue.java | Class | A work queue. |
WorkQueueThread.java | Class | A worker thread for the WorkQueue object. |