See: Description
| Package | Description |
|---|---|
| javolution.context |
Run-time
contexts to facilitate
separation of concerns and achieve higher level of performance and flexibility. |
| javolution.io | |
| javolution.lang |
Fundamental classes, interfaces and annotations.
|
| javolution.test |
Testing tools for validation and performance.
|
| javolution.text |
Text handling package.
|
| javolution.util |
High-performance collection classes with
worst case execution time behavior documented. |
| javolution.util.function |
Basic functions for lambda expressions and method references.
|
| javolution.util.service |
Service interfaces to be implemented by
javolution.util.*
collections and collections views. |
| javolution.xml |
Support for the encoding of objects, and the objects reachable from them,
into
XML; and the complementary reconstruction of the
object graph from XML. |
| javolution.xml.sax | |
| javolution.xml.stream |
StAX-like XML readers/writers which do not require object
creation (such as String) and are consequently faster than standard StAX.
|
| javolution.xml.ws |
Classes and interfaces to create and handle web services.
|
Permission to use, copy, modify, and distribute this software is freely granted, provided that copyright notices are preserved (the full license text can be found here).
Javolution's users are encouraged to show their support with the button.
Javolution can be used as a standard OSGi bundle.
import org.osgi.framework.*; import org.osgi.util.tracker.ServiceTracker; public class MyActivator implements BundleActivator { ServiceTracker<XMLInputFactory, XMLInputFactory> tracker; public void start(BundleContext bc) throws Exception { tracker = new ServiceTracker<>(bc, XMLInputFactory.class, null); tracker.open(); parse(); } public void stop(BundleContext bc) throws Exception { tracker.close(); } public void parse() throws XMLStreamException { XMLInputFactory factory = tracker.getService(); factory.setProperty(XMLInputFactory.IS_COALESCING, true); // Configures. // Instantiates a new reader. String xml = "<test>This is a test</test>"; CharSequenceReader in = new CharSequenceReader().setInput(xml); XMLStreamReader reader = factory.createXMLStreamReader(in); // Parses XML. while (reader.hasNext()) { int eventType = reader.next(); if (eventType == XMLStreamConstants.CHARACTERS) { System.out.println(reader.getText()); } } // Closes the reader which may be recycled back to the factory. reader.close(); } }
Or as a standard Java library (does not require OSGi runtime).
import javolution.osgi.internal.OSGiServices; public class Main { public static void main(String[] args) throws XMLStreamException { XMLInputFactory factory = OSGiServices.getXMLInputFactory(); factory.setProperty(XMLInputFactory.IS_COALESCING, true); // Configures. // Instantiates a reader. String xml = "<test>This is a test</test>"; CharSequenceReader in = new CharSequenceReader().setInput(xml); XMLStreamReader reader = factory.createXMLStreamReader(in); // Parses XML. while (reader.hasNext()) { int eventType = reader.next(); if (eventType == XMLStreamConstants.CHARACTERS) { System.out.println(reader.getText()); } } // Closes the reader which may be recycled back to the factory. reader.close(); } }
Javolution publishes the following OSGi services.
XMLInputFactory
StAX-like version of javax.xml.stream.XMLInputFactory avoiding String allocations.
XMLOutputFactory
StAX-like version of javax.xml.stream.XMLOutputFactory using CharSequence instead of String
These services can be accessed through the standard OSGi registry
or using javolution.osgi.internal.OSGiServices when running outside OSGi.
Javolution listen to the following OSGi services.
org.osgi.service.log.LogService
OSGi service to log messages.
LogContext
Service to support asynchronous logging.
ConcurrentContext
Service to support concurrent executions.
LocalContext
Service to support locally scoped settings.
SecurityContext
Service granting security authorizations.
TextContext
Service to support text parsing/formatting.
XMLContext
Service to support XML serialization/deserialization.
Copyright © 2005-2013 Javolution. All Rights Reserved.