git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@557272 13f79535-47bb-0310-9956-ffa450edef68tags/fop-0_95beta
} | } | ||||
/** | /** | ||||
* @inheritDoc java.awt.color.ColorSpace#toRGB(float[]) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public float[] toRGB(float[] colorvalue) { | public float[] toRGB(float[] colorvalue) { | ||||
return new float [] { | return new float [] { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc java.awt.color.ColorSpace#fromRGB(float[]) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public float[] fromRGB(float[] rgbvalue) { | public float[] fromRGB(float[] rgbvalue) { | ||||
throw new UnsupportedOperationException("NYI"); | throw new UnsupportedOperationException("NYI"); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc java.awt.color.ColorSpace#toCIEXYZ(float[]) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public float[] toCIEXYZ(float[] colorvalue) { | public float[] toCIEXYZ(float[] colorvalue) { | ||||
throw new UnsupportedOperationException("NYI"); | throw new UnsupportedOperationException("NYI"); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc java.awt.color.ColorSpace#fromCIEXYZ(float[]) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public float[] fromCIEXYZ(float[] colorvalue) { | public float[] fromCIEXYZ(float[] colorvalue) { | ||||
throw new UnsupportedOperationException("NYI"); | throw new UnsupportedOperationException("NYI"); |
} | } | ||||
/** | /** | ||||
* @inheritDoc java.io.OutputStream#close() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void close() throws IOException { | public void close() throws IOException { | ||||
try { | try { |
* @return a color if possible | * @return a color if possible | ||||
* @throws PropertyException | * @throws PropertyException | ||||
* if the format is wrong. | * if the format is wrong. | ||||
* @inheritDoc java.awt.Color#toString() | |||||
* @see java.awt.Color#toString() | |||||
*/ | */ | ||||
private static Color parseAsJavaAWTColor(String value) | private static Color parseAsJavaAWTColor(String value) | ||||
throws PropertyException { | throws PropertyException { |
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#isTraceEnabled() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final boolean isTraceEnabled() { | public final boolean isTraceEnabled() { | ||||
return logLevel <= LOG_LEVEL_TRACE; | return logLevel <= LOG_LEVEL_TRACE; | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#isDebugEnabled() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final boolean isDebugEnabled() { | public final boolean isDebugEnabled() { | ||||
return logLevel <= LOG_LEVEL_DEBUG; | return logLevel <= LOG_LEVEL_DEBUG; | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#isInfoEnabled() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final boolean isInfoEnabled() { | public final boolean isInfoEnabled() { | ||||
return logLevel <= LOG_LEVEL_INFO; | return logLevel <= LOG_LEVEL_INFO; | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#isWarnEnabled() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final boolean isWarnEnabled() { | public final boolean isWarnEnabled() { | ||||
return logLevel <= LOG_LEVEL_WARN; | return logLevel <= LOG_LEVEL_WARN; | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#isErrorEnabled() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final boolean isErrorEnabled() { | public final boolean isErrorEnabled() { | ||||
return logLevel <= LOG_LEVEL_ERROR; | return logLevel <= LOG_LEVEL_ERROR; | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#isFatalEnabled() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final boolean isFatalEnabled() { | public final boolean isFatalEnabled() { | ||||
return logLevel <= LOG_LEVEL_FATAL; | return logLevel <= LOG_LEVEL_FATAL; | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#trace(java.lang.Object) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final void trace(Object message) { | public final void trace(Object message) { | ||||
if (isTraceEnabled()) { | if (isTraceEnabled()) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#trace(java.lang.Object, java.lang.Throwable) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final void trace(Object message, Throwable t) { | public final void trace(Object message, Throwable t) { | ||||
if (isTraceEnabled()) { | if (isTraceEnabled()) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#debug(java.lang.Object) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final void debug(Object message) { | public final void debug(Object message) { | ||||
if (isDebugEnabled()) { | if (isDebugEnabled()) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#debug(java.lang.Object, java.lang.Throwable) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final void debug(Object message, Throwable t) { | public final void debug(Object message, Throwable t) { | ||||
if (isDebugEnabled()) { | if (isDebugEnabled()) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#info(java.lang.Object) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final void info(Object message) { | public final void info(Object message) { | ||||
if (isInfoEnabled()) { | if (isInfoEnabled()) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#info(java.lang.Object, java.lang.Throwable) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final void info(Object message, Throwable t) { | public final void info(Object message, Throwable t) { | ||||
if (isInfoEnabled()) { | if (isInfoEnabled()) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#warn(java.lang.Object) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final void warn(Object message) { | public final void warn(Object message) { | ||||
if (isWarnEnabled()) { | if (isWarnEnabled()) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#warn(java.lang.Object, java.lang.Throwable) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final void warn(Object message, Throwable t) { | public final void warn(Object message, Throwable t) { | ||||
if (isWarnEnabled()) { | if (isWarnEnabled()) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#error(java.lang.Object) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final void error(Object message) { | public final void error(Object message) { | ||||
if (isErrorEnabled()) { | if (isErrorEnabled()) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#error(java.lang.Object, java.lang.Throwable) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final void error(Object message, Throwable t) { | public final void error(Object message, Throwable t) { | ||||
if (isErrorEnabled()) { | if (isErrorEnabled()) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#fatal(java.lang.Object) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final void fatal(Object message) { | public final void fatal(Object message) { | ||||
if (isFatalEnabled()) { | if (isFatalEnabled()) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.commons.logging.Log#fatal(java.lang.Object, java.lang.Throwable) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public final void fatal(Object message, Throwable t) { | public final void fatal(Object message, Throwable t) { | ||||
if (isFatalEnabled()) { | if (isFatalEnabled()) { |
this.domImplementation = domImplementation; | this.domImplementation = domImplementation; | ||||
} | } | ||||
/** @inheritDoc org.apache.fop.util.ContentHandlerFactory#getSupportedNamespaces() */ | |||||
/** {@inheritDoc} */ | |||||
public String[] getSupportedNamespaces() { | public String[] getSupportedNamespaces() { | ||||
return new String[] {namespaceURI}; | return new String[] {namespaceURI}; | ||||
} | } | ||||
/** @inheritDoc org.apache.fop.util.ContentHandlerFactory#createContentHandler() */ | |||||
/** {@inheritDoc} */ | |||||
public ContentHandler createContentHandler() throws SAXException { | public ContentHandler createContentHandler() throws SAXException { | ||||
return new Handler(); | return new Handler(); | ||||
} | } | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.fop.util.ContentHandlerFactory.ObjectSource#getObject() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public Object getObject() { | public Object getObject() { | ||||
return getDocument(); | return getDocument(); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.fop.util.ContentHandlerFactory.ObjectSource | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void setObjectBuiltListener(ObjectBuiltListener listener) { | public void setObjectBuiltListener(ObjectBuiltListener listener) { | ||||
this.obListener = listener; | this.obListener = listener; | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.fop.util.DelegatingContentHandler#startDocument() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void startDocument() throws SAXException { | public void startDocument() throws SAXException { | ||||
//Suppress startDocument() call if doc has not been set, yet. It will be done later. | //Suppress startDocument() call if doc has not been set, yet. It will be done later. | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.fop.util.DelegatingContentHandler | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void startElement(String uri, String localName, String qName, Attributes atts) | public void startElement(String uri, String localName, String qName, Attributes atts) | ||||
throws SAXException { | throws SAXException { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.apache.fop.util.DelegatingContentHandler#endDocument() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void endDocument() throws SAXException { | public void endDocument() throws SAXException { | ||||
super.endDocument(); | super.endDocument(); |
public class DataURIResolver implements URIResolver { | public class DataURIResolver implements URIResolver { | ||||
/** | /** | ||||
* @inheritDoc javax.xml.transform.URIResolver#resolve(java.lang.String, java.lang.String) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public Source resolve(String href, String base) throws TransformerException { | public Source resolve(String href, String base) throws TransformerException { | ||||
if (href.startsWith("data:")) { | if (href.startsWith("data:")) { | ||||
* Parses inline data URIs as generated by MS Word's XML export and FO | * Parses inline data URIs as generated by MS Word's XML export and FO | ||||
* stylesheet. | * stylesheet. | ||||
* | * | ||||
* @inheritDoc <a href="http://www.ietf.org/rfc/rfc2397">RFC 2397</a> | |||||
* @see <a href="http://www.ietf.org/rfc/rfc2397">RFC 2397</a> | |||||
*/ | */ | ||||
private Source parseDataURI(String href) { | private Source parseDataURI(String href) { | ||||
int commaPos = href.indexOf(','); | int commaPos = href.indexOf(','); |
} | } | ||||
/** | /** | ||||
* @inheritDoc javax.xml.transform.ErrorListener#warning(javax.xml.transform.TransformerException) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void warning(TransformerException exc) { | public void warning(TransformerException exc) { | ||||
log.warn(exc.toString()); | log.warn(exc.toString()); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc javax.xml.transform.ErrorListener#error(javax.xml.transform.TransformerException) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void error(TransformerException exc) throws TransformerException { | public void error(TransformerException exc) throws TransformerException { | ||||
throw exc; | throw exc; | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc javax.xml.transform.ErrorListener#fatalError(javax.xml.transform.TransformerException) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void fatalError(TransformerException exc) | public void fatalError(TransformerException exc) | ||||
throws TransformerException { | throws TransformerException { |
// ==== EntityResolver | // ==== EntityResolver | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.EntityResolver#resolveEntity(java.lang.String, java.lang.String) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { | public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { | ||||
if (entityResolver != null) { | if (entityResolver != null) { | ||||
// ==== DTDHandler | // ==== DTDHandler | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.DTDHandler#notationDecl(java.lang.String, java.lang.String, java.lang.String) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void notationDecl(String name, String publicId, String systemId) throws SAXException { | public void notationDecl(String name, String publicId, String systemId) throws SAXException { | ||||
if (dtdHandler != null) { | if (dtdHandler != null) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.DTDHandler#unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void unparsedEntityDecl(String name, String publicId, String systemId, | public void unparsedEntityDecl(String name, String publicId, String systemId, | ||||
String notationName) throws SAXException { | String notationName) throws SAXException { | ||||
// ==== ContentHandler | // ==== ContentHandler | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ContentHandler#setDocumentLocator(org.xml.sax.Locator) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void setDocumentLocator(Locator locator) { | public void setDocumentLocator(Locator locator) { | ||||
delegate.setDocumentLocator(locator); | delegate.setDocumentLocator(locator); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ContentHandler#startDocument() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void startDocument() throws SAXException { | public void startDocument() throws SAXException { | ||||
delegate.startDocument(); | delegate.startDocument(); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ContentHandler#endDocument() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void endDocument() throws SAXException { | public void endDocument() throws SAXException { | ||||
delegate.endDocument(); | delegate.endDocument(); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ContentHandler#startPrefixMapping(java.lang.String, java.lang.String) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void startPrefixMapping(String prefix, String uri) throws SAXException { | public void startPrefixMapping(String prefix, String uri) throws SAXException { | ||||
delegate.startPrefixMapping(prefix, uri); | delegate.startPrefixMapping(prefix, uri); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ContentHandler#endPrefixMapping(java.lang.String) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void endPrefixMapping(String prefix) throws SAXException { | public void endPrefixMapping(String prefix) throws SAXException { | ||||
delegate.endPrefixMapping(prefix); | delegate.endPrefixMapping(prefix); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void startElement(String uri, String localName, String qName, | public void startElement(String uri, String localName, String qName, | ||||
Attributes atts) throws SAXException { | Attributes atts) throws SAXException { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String, java.lang.String) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void endElement(String uri, String localName, String qName) throws SAXException { | public void endElement(String uri, String localName, String qName) throws SAXException { | ||||
delegate.endElement(uri, localName, qName); | delegate.endElement(uri, localName, qName); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ContentHandler#characters(char[], int, int) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void characters(char[] ch, int start, int length) throws SAXException { | public void characters(char[] ch, int start, int length) throws SAXException { | ||||
delegate.characters(ch, start, length); | delegate.characters(ch, start, length); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { | public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { | ||||
delegate.ignorableWhitespace(ch, start, length); | delegate.ignorableWhitespace(ch, start, length); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ContentHandler#processingInstruction(java.lang.String, java.lang.String) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void processingInstruction(String target, String data) throws SAXException { | public void processingInstruction(String target, String data) throws SAXException { | ||||
delegate.processingInstruction(target, data); | delegate.processingInstruction(target, data); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ContentHandler#skippedEntity(java.lang.String) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void skippedEntity(String name) throws SAXException { | public void skippedEntity(String name) throws SAXException { | ||||
delegate.skippedEntity(name); | delegate.skippedEntity(name); | ||||
// ==== LexicalHandler | // ==== LexicalHandler | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ext.LexicalHandler#startDTD(java.lang.String, java.lang.String, java.lang.String) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void startDTD(String name, String publicId, String systemId) throws SAXException { | public void startDTD(String name, String publicId, String systemId) throws SAXException { | ||||
if (lexicalHandler != null) { | if (lexicalHandler != null) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ext.LexicalHandler#endDTD() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void endDTD() throws SAXException { | public void endDTD() throws SAXException { | ||||
if (lexicalHandler != null) { | if (lexicalHandler != null) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ext.LexicalHandler#startEntity(java.lang.String) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void startEntity(String name) throws SAXException { | public void startEntity(String name) throws SAXException { | ||||
if (lexicalHandler != null) { | if (lexicalHandler != null) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ext.LexicalHandler#endEntity(java.lang.String) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void endEntity(String name) throws SAXException { | public void endEntity(String name) throws SAXException { | ||||
if (lexicalHandler != null) { | if (lexicalHandler != null) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ext.LexicalHandler#startCDATA() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void startCDATA() throws SAXException { | public void startCDATA() throws SAXException { | ||||
if (lexicalHandler != null) { | if (lexicalHandler != null) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ext.LexicalHandler#endCDATA() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void endCDATA() throws SAXException { | public void endCDATA() throws SAXException { | ||||
if (lexicalHandler != null) { | if (lexicalHandler != null) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ext.LexicalHandler#comment(char[], int, int) | |||||
* {@inheritDoc} int, int) | |||||
*/ | */ | ||||
public void comment(char[] ch, int start, int length) throws SAXException { | public void comment(char[] ch, int start, int length) throws SAXException { | ||||
if (lexicalHandler != null) { | if (lexicalHandler != null) { | ||||
// ==== ErrorHandler | // ==== ErrorHandler | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ErrorHandler#warning(org.xml.sax.SAXParseException) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void warning(SAXParseException exception) throws SAXException { | public void warning(SAXParseException exception) throws SAXException { | ||||
if (errorHandler != null) { | if (errorHandler != null) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void error(SAXParseException exception) throws SAXException { | public void error(SAXParseException exception) throws SAXException { | ||||
if (errorHandler != null) { | if (errorHandler != null) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void fatalError(SAXParseException exception) throws SAXException { | public void fatalError(SAXParseException exception) throws SAXException { | ||||
if (errorHandler != null) { | if (errorHandler != null) { |
return getPrefix() != null ? getPrefix() + ':' + getLocalName() : getLocalName(); | return getPrefix() != null ? getPrefix() + ':' + getLocalName() : getLocalName(); | ||||
} | } | ||||
/** @inheritDoc java.lang.Object#hashCode() */ | |||||
/** {@inheritDoc} */ | |||||
public int hashCode() { | public int hashCode() { | ||||
return this.hashCode; | return this.hashCode; | ||||
} | } | ||||
/** @inheritDoc java.lang.Object#equals(java.lang.Object) */ | |||||
/** {@inheritDoc} */ | |||||
public boolean equals(Object obj) { | public boolean equals(Object obj) { | ||||
if (obj == null) { | if (obj == null) { | ||||
return false; | return false; | ||||
return false; | return false; | ||||
} | } | ||||
/** @inheritDoc java.lang.Object#toString() */ | |||||
/** {@inheritDoc} */ | |||||
public String toString() { | public String toString() { | ||||
return prefix != null | return prefix != null | ||||
? (prefix + ":" + localName) | ? (prefix + ":" + localName) |
} | } | ||||
/** | /** | ||||
* @inheritDoc java.io.OutputStream#close() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void close() throws IOException { | public void close() throws IOException { | ||||
writer.close(); | writer.close(); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc java.io.OutputStream#flush() | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void flush() throws IOException { | public void flush() throws IOException { | ||||
writer.flush(); | writer.flush(); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc java.io.OutputStream#write(byte[], int, int) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void write(byte[] buf, int offset, int length) throws IOException { | public void write(byte[] buf, int offset, int length) throws IOException { | ||||
if (encoding != null) { | if (encoding != null) { | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc java.io.OutputStream#write(byte[]) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void write(byte[] buf) throws IOException { | public void write(byte[] buf) throws IOException { | ||||
write(buf, 0, buf.length); | write(buf, 0, buf.length); | ||||
} | } | ||||
/** | /** | ||||
* @inheritDoc java.io.OutputStream#write(int) | |||||
* {@inheritDoc} | |||||
*/ | */ | ||||
public void write(int b) throws IOException { | public void write(int b) throws IOException { | ||||
write(new byte[] {(byte)b}); | write(new byte[] {(byte)b}); |