This project has retired. For details please refer to its
Attic page .
XMidiSerializer (Cocoon API 2.1.12-dev [March 20 2012])
org.apache.cocoon.serialization
Class XMidiSerializer
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.xml.AbstractXMLPipe
org.apache.cocoon.serialization.AbstractSerializer
org.apache.cocoon.serialization.XMidiSerializer
All Implemented Interfaces: Poolable , Recyclable , Component , LogEnabled , Serializer , SitemapOutputComponent , XMLPipe , XMLProducer , XMLConsumer , ContentHandler , LexicalHandler
public class XMidiSerializer extends AbstractSerializer
Takes SAX Events and serializes them as a standard MIDI file.
The MIDI file generation parts of this class are based on code from the XMidi project, written
by Peter Arthur Loeb (http://www.palserv.com/XMidi/) and used with permission.
The warranty disclaimer of the MIT license (http://www.opensource.org/licenses/mit-license.html)
applies to Peter Arthur Loeb's code.
Version:
CVS $Id: XMidiSerializer.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Mark Leicester , Peter Loeb
Fields inherited from interface org.apache.cocoon.serialization.Serializer
ROLE
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe
comment , endCDATA , endDocument , endDTD , endEntity , endPrefixMapping , ignorableWhitespace , processingInstruction , setDocumentLocator , skippedEntity , startCDATA , startDocument , startDTD , startEntity , startPrefixMapping
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
XMidiSerializer
public XMidiSerializer ()
recycle
public void recycle ()
Description copied from class: AbstractSerializer
Recycle serializer by removing references
Specified by: recycle
in interface Recyclable
Overrides: recycle
in class AbstractSerializer
getMimeType
public String getMimeType ()
Description copied from class: AbstractSerializer
Get the mime-type of the output of this Serializer
Specified by: getMimeType
in interface SitemapOutputComponent
Overrides: getMimeType
in class AbstractSerializer
See Also: AbstractProcessingPipeline.setMimeTypeForSerializer(org.apache.cocoon.environment.Environment)
,
AbstractProcessingPipeline.setMimeTypeForReader(org.apache.cocoon.environment.Environment)
startElement
public void startElement (String namespaceURI,
String localName,
String qName,
Attributes atts)
throws SAXException
Description copied from class: AbstractXMLPipe
Receive notification of the beginning of an element.
Specified by: startElement
in interface ContentHandler
Overrides: startElement
in class AbstractXMLPipe
Parameters: namespaceURI
- The Namespace URI, or the empty string if the element has no
Namespace URI or if Namespace
processing is not being performed.localName
- The local name (without prefix), or the empty string if
Namespace processing is not being performed.qName
- The raw XML 1.0 name (with prefix), or the empty string if
raw names are not available.atts
- The attributes attached to the element. If there are no
attributes, it shall be an empty Attributes object.
Throws:
SAXException
endElement
public void endElement (String namespaceURI,
String localName,
String qName)
throws SAXException
Description copied from class: AbstractXMLPipe
Receive notification of the end of an element.
Specified by: endElement
in interface ContentHandler
Overrides: endElement
in class AbstractXMLPipe
Parameters: namespaceURI
- The Namespace URI, or the empty string if the element has no
Namespace URI or if Namespace
processing is not being performed.localName
- The local name (without prefix), or the empty string if
Namespace processing is not being performed.qName
- The raw XML 1.0 name (with prefix), or the empty string if
raw names are not available.
Throws:
SAXException
characters
public void characters (char[] str,
int arg1,
int arg2)
throws SAXException
Description copied from class: AbstractXMLPipe
Receive notification of character data.
Specified by: characters
in interface ContentHandler
Overrides: characters
in class AbstractXMLPipe
Parameters: str
- The characters from the XML document.arg1
- The start position in the array.arg2
- The number of characters to read from the array.
Throws:
SAXException
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.