org.mmbase.util.transformers |
org.mmbase.util.tranformers
`Tranformers' define tranformations of Strings, byte arrays and streams.
Transformers are devided in three species. CharTransformers which transform some String to
another String (or Reader to a Writer). Then there are transformation which take a byte array
(or an InputStream) and transform that to a String (or a Writer), these are called
ByteToCharTransformers. And the last type are are the ByteTranformers, which tranform a byte
array to another byte array (or an InputStream to an OutputStream).
All Transformers can be specialized to 'ConfigurableTransformers'.
Several Abstract implemenations are present too. E.g. the 'ReaderTransformer' is nearly a
complete CharTransformer, only the function wich pipes a Reader to a Writer is
abstract. StringTranformer is a CharTransformer which' only abstract function is the one
taking a String argument.
|
Java Source File Name | Type | Comment |
AbstractCommandStringTransformer.java | Class | If you want to transform a Reader stream by the use of an external command, than you can extend
this class. |
Base64.java | Class | |
BufferedReaderTransformer.java | Class | |
ByteArrayToCharTransformer.java | Class | You need only to implement transform(byte[]) you have the simplest
kind of transformer (which is not 'streamable'). |
ByteCharTransformer.java | Class | A CharTransformer which wraps a ByteToCharTransformer. |
ByteToCharTransformer.java | Interface | Interface for transformations. |
ByteTransformer.java | Interface | Interface for transformations. |
Censor.java | Class | Replaces certain 'forbidden' words by something more decent. |
ChainedCharTransformer.java | Class | A CharTransformer which wraps N other CharTransformers, and links them with N - 1 new Threads,
effectively working as a 'chained' transformer.
The first transformation is done by the ChainedCharTransformer instance itself, after starting
the N - 1 Threads for the other N - 1 transformations.
If no CharTransformers are added, and 'transform' is called, logically, nothing will happen. |
CharTransformer.java | Interface | Interface for transformations. |
CharTransformerLink.java | Class | A Runnable implementation to perform a CharTransform between a Reader and a Writer. |
ChecksumFactory.java | Class | Creates ByteToCharTransformers, creating a 'checksum' string of a byte-arrays. |
ChunkedTransformer.java | Class | A chunked transformer is a transformer that transforms on a 'chunk by chunk' base. |
CodeSampleFactory.java | Class | This TransformerFactory enables the use of two different escapers in one piece
of text. |
Config.java | Class | Describes what encoding is configured. |
ConfigurableReaderTransformer.java | Class | Some Transformers implement more than one transformation. |
ConfigurableStringTransformer.java | Class | Some Transformers implement more than one transformation. |
ConfigurableTransformer.java | Interface | Interface for transformations. |
CopyCharTransformer.java | Class | This is the character transformer which does not actually transform
anything, it just copies the reader to the writer. |
CP1252Surrogator.java | Class | Surrogates the Windows CP1252 characters which are not valid ISO-8859-1. |
EncryptionTransformerFactory.java | Class | This transformerfactory can encrypt and decrypt strings. |
Figlet.java | Class | An escaper based on the amusing 'figlet' tool, which is available on some system. |
GoogleHighlighterFactory.java | Class | An example for parameterized transformers. |
Hex.java | Class | Encode a bytearray to a string by converting every byte to a hexadecimal (00 - FF)
representation, and decode the other way around. |
Identifier.java | Class | Transforms strings to identifiers, replacing punctuation and whitespace with
underscores. |
InverseCharTransformer.java | Class | Turns a Transformer around. |
Javascript.java | Class | Encodings related Javascript It can escape single quotes, by replacing them by \\', as is needed in document.write actions. |
Latin3Surrogator.java | Class | The ISO-8859-3 ('South European') unibyte encoding is used for languages like maltese and
esperanto. |
LinkFinder.java | Class | Finds links in the Character String, and makes them 'clickable' for HTML (using a-tags). |
LowerCaser.java | Class | |
MD5.java | Class | Do MD5 encoding. |
ParameterizedTransformerFactory.java | Interface | ParameterizedTransformerFactories, can create
Transformer instances, but can do that
'parameterized'. |
Perl.java | Class | And yet another rather idiotic type of Transformer. |
ReaderTransformer.java | Class | You need only to implement transform(Reader, Writer) you have the simplest
kind of tranformer (which is 'streamable'). |
RegexpReplacer.java | Class | Finds regexps in the Character String, and replaces them. |
RegexpReplacerFactory.java | Class | Factories new instances of extensions of
RegexpReplacer , for which the replace patterns
are parameterized (using the 'patterns' parameter). |
ResourceBundleReplacerFactory.java | Class | Factories new chartransformer based on
java.util.ResourceBundle . |
RomanTransformer.java | Class | Static utilities to deal with roman numbers, and non static functions to transform strings
representing decimal numbers to roman numbers and back. |
Rot13.java | Class | Rot13 implementation. |
Rot5.java | Class | Rot5 implementation. |
Sitestat.java | Class | Transforms the input to the characters which are alowed in Sitestat keys for
page statistics, being: "A-Z, a-z, 0-9, - . |
SpaceReducer.java | Class | Replace 1 or more spaces by 1 space, and 1 or more newlines by 1
newline. |
SpaceRemover.java | Class | Replace 1 or white space by 1 space, and all spaces on the begin and end. |
SpaceSwallower.java | Class | Swallows all spaces. |
Sql.java | Class | Encodings related to Sql. |
StringTransformer.java | Class | You need only to implement transform(String) you have the simplest
kind of tranformer (which is not 'streamable'). |
SubstringFactory.java | Class | Factories
CharTransformer 's which mirror the input, but only between 'from' and 'to'
parameters. |
Swallower.java | Class | |
TabToSpacesTransformer.java | Class | Replace every tab by n spaces. |
TagStripperFactory.java | Class | Can be used to strip tags and attributes from HTML. |
Transformer.java | Interface | Interface for transformations. |
Transformers.java | Class | Utitilies related to the tranformers of this package. |
TransformingReader.java | Class | A Filtering Reader based on CharTransformers.
_________ ____
/ \/ \
| R --> PW - this |
| T | PR |
\_________/ \____/
PW: piped writer, this PR: this reader, T: transformer
This reader can be instantiated with another Reader and a CharTransformer. |
TransformingWriter.java | Class | A Filtering Writer based on CharTransformers.
____ _________
/ \/ \
|this - PR --> W |
| PW | T |
\____/ \________/
PR: piped reader, this PW: this writer, T: transformer
This writer can be instantiated with another Writer and a CharTransformer. |
Trimmer.java | Class | Trims leading and trailing white space. |
UnicodeEscaper.java | Class | To escape from and to 'java' like unicode escaping. |
UnknownCodingException.java | Class | |
UpperCaser.java | Class | A 'hello world' for CharTransformers. |
Url.java | Class | Encodings related to URL's. |
UrlEscaper.java | Class | Escapes and Unescapes undesirable characters using % (URLEncoding)
Contrary to java.net.URLEncoder, it does not encode '+'. |
WordWrapperFactory.java | Class | Word wrapping as a transformer factory. |
Xml.java | Class | Transformations related to escaping in XML. |
XmlEntities.java | Class | Any non-ASCII character will be replaced by an XML-entity. |
XmlField.java | Class | XMLFields in MMBase. |