com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler Java Examples
The following examples show how to use
com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: IndentingUTF8XmlOutput.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * * @param indentStr * set to null for no indentation and optimal performance. * otherwise the string is used for indentation. */ public IndentingUTF8XmlOutput(OutputStream out, String indentStr, Encoded[] localNames, CharacterEscapeHandler escapeHandler) { super(out, localNames, escapeHandler); if(indentStr!=null) { Encoded e = new Encoded(indentStr); indent8 = new Encoded(); indent8.ensureSize(e.len*8); unitLen = e.len; for( int i=0; i<8; i++ ) System.arraycopy(e.buf, 0, indent8.buf, unitLen*i, unitLen); } else { this.indent8 = null; this.unitLen = 0; } }
Example #2
Source File: IndentingUTF8XmlOutput.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * * @param indentStr * set to null for no indentation and optimal performance. * otherwise the string is used for indentation. */ public IndentingUTF8XmlOutput(OutputStream out, String indentStr, Encoded[] localNames, CharacterEscapeHandler escapeHandler) { super(out, localNames, escapeHandler); if(indentStr!=null) { Encoded e = new Encoded(indentStr); indent8 = new Encoded(); indent8.ensureSize(e.len*8); unitLen = e.len; for( int i=0; i<8; i++ ) System.arraycopy(e.buf, 0, indent8.buf, unitLen*i, unitLen); } else { this.indent8 = null; this.unitLen = 0; } }
Example #3
Source File: IndentingUTF8XmlOutput.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * * @param indentStr * set to null for no indentation and optimal performance. * otherwise the string is used for indentation. */ public IndentingUTF8XmlOutput(OutputStream out, String indentStr, Encoded[] localNames, CharacterEscapeHandler escapeHandler) { super(out, localNames, escapeHandler); if(indentStr!=null) { Encoded e = new Encoded(indentStr); indent8 = new Encoded(); indent8.ensureSize(e.len*8); unitLen = e.len; for( int i=0; i<8; i++ ) System.arraycopy(e.buf, 0, indent8.buf, unitLen*i, unitLen); } else { this.indent8 = null; this.unitLen = 0; } }
Example #4
Source File: MarshallerImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
protected CharacterEscapeHandler createEscapeHandler( String encoding ) { if( escapeHandler!=null ) // user-specified one takes precedence. return escapeHandler; if( encoding.startsWith("UTF") ) // no need for character reference. Use the handler // optimized for that pattern. return MinimumEscapeHandler.theInstance; // otherwise try to find one from the encoding try { // try new JDK1.4 NIO return new NioEscapeHandler( getJavaEncoding(encoding) ); } catch( Throwable e ) { // if that fails, fall back to the dumb mode return DumbEscapeHandler.theInstance; } }
Example #5
Source File: MarshallerImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
protected CharacterEscapeHandler createEscapeHandler( String encoding ) { if( escapeHandler!=null ) // user-specified one takes precedence. return escapeHandler; if( encoding.startsWith("UTF") ) // no need for character reference. Use the handler // optimized for that pattern. return MinimumEscapeHandler.theInstance; // otherwise try to find one from the encoding try { // try new JDK1.4 NIO return new NioEscapeHandler( getJavaEncoding(encoding) ); } catch( Throwable e ) { // if that fails, fall back to the dumb mode return DumbEscapeHandler.theInstance; } }
Example #6
Source File: MarshallerImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
protected CharacterEscapeHandler createEscapeHandler( String encoding ) { if( escapeHandler!=null ) // user-specified one takes precedence. return escapeHandler; if( encoding.startsWith("UTF") ) // no need for character reference. Use the handler // optimized for that pattern. return MinimumEscapeHandler.theInstance; // otherwise try to find one from the encoding try { // try new JDK1.4 NIO return new NioEscapeHandler( getJavaEncoding(encoding) ); } catch( Throwable e ) { // if that fails, fall back to the dumb mode return DumbEscapeHandler.theInstance; } }
Example #7
Source File: IndentingUTF8XmlOutput.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * * @param indentStr * set to null for no indentation and optimal performance. * otherwise the string is used for indentation. */ public IndentingUTF8XmlOutput(OutputStream out, String indentStr, Encoded[] localNames, CharacterEscapeHandler escapeHandler) { super(out, localNames, escapeHandler); if(indentStr!=null) { Encoded e = new Encoded(indentStr); indent8 = new Encoded(); indent8.ensureSize(e.len*8); unitLen = e.len; for( int i=0; i<8; i++ ) System.arraycopy(e.buf, 0, indent8.buf, unitLen*i, unitLen); } else { this.indent8 = null; this.unitLen = 0; } }
Example #8
Source File: MarshallerImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
protected CharacterEscapeHandler createEscapeHandler( String encoding ) { if( escapeHandler!=null ) // user-specified one takes precedence. return escapeHandler; if( encoding.startsWith("UTF") ) // no need for character reference. Use the handler // optimized for that pattern. return MinimumEscapeHandler.theInstance; // otherwise try to find one from the encoding try { // try new JDK1.4 NIO return new NioEscapeHandler( getJavaEncoding(encoding) ); } catch( Throwable e ) { // if that fails, fall back to the dumb mode return DumbEscapeHandler.theInstance; } }
Example #9
Source File: IndentingUTF8XmlOutput.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * * @param indentStr * set to null for no indentation and optimal performance. * otherwise the string is used for indentation. */ public IndentingUTF8XmlOutput(OutputStream out, String indentStr, Encoded[] localNames, CharacterEscapeHandler escapeHandler) { super(out, localNames, escapeHandler); if(indentStr!=null) { Encoded e = new Encoded(indentStr); indent8 = new Encoded(); indent8.ensureSize(e.len*8); unitLen = e.len; for( int i=0; i<8; i++ ) System.arraycopy(e.buf, 0, indent8.buf, unitLen*i, unitLen); } else { this.indent8 = null; this.unitLen = 0; } }
Example #10
Source File: MarshallerImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
protected CharacterEscapeHandler createEscapeHandler( String encoding ) { if( escapeHandler!=null ) // user-specified one takes precedence. return escapeHandler; if( encoding.startsWith("UTF") ) // no need for character reference. Use the handler // optimized for that pattern. return MinimumEscapeHandler.theInstance; // otherwise try to find one from the encoding try { // try new JDK1.4 NIO return new NioEscapeHandler( getJavaEncoding(encoding) ); } catch( Throwable e ) { // if that fails, fall back to the dumb mode return DumbEscapeHandler.theInstance; } }
Example #11
Source File: MarshallerImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
protected CharacterEscapeHandler createEscapeHandler( String encoding ) { if( escapeHandler!=null ) // user-specified one takes precedence. return escapeHandler; if( encoding.startsWith("UTF") ) // no need for character reference. Use the handler // optimized for that pattern. return MinimumEscapeHandler.theInstance; // otherwise try to find one from the encoding try { // try new JDK1.4 NIO return new NioEscapeHandler( getJavaEncoding(encoding) ); } catch( Throwable e ) { // if that fails, fall back to the dumb mode return DumbEscapeHandler.theInstance; } }
Example #12
Source File: IndentingUTF8XmlOutput.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * * @param indentStr * set to null for no indentation and optimal performance. * otherwise the string is used for indentation. */ public IndentingUTF8XmlOutput(OutputStream out, String indentStr, Encoded[] localNames, CharacterEscapeHandler escapeHandler) { super(out, localNames, escapeHandler); if(indentStr!=null) { Encoded e = new Encoded(indentStr); indent8 = new Encoded(); indent8.ensureSize(e.len*8); unitLen = e.len; for( int i=0; i<8; i++ ) System.arraycopy(e.buf, 0, indent8.buf, unitLen*i, unitLen); } else { this.indent8 = null; this.unitLen = 0; } }
Example #13
Source File: MarshallerImpl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
protected CharacterEscapeHandler createEscapeHandler( String encoding ) { if( escapeHandler!=null ) // user-specified one takes precedence. return escapeHandler; if( encoding.startsWith("UTF") ) // no need for character reference. Use the handler // optimized for that pattern. return MinimumEscapeHandler.theInstance; // otherwise try to find one from the encoding try { // try new JDK1.4 NIO return new NioEscapeHandler( getJavaEncoding(encoding) ); } catch( Throwable e ) { // if that fails, fall back to the dumb mode return DumbEscapeHandler.theInstance; } }
Example #14
Source File: MarshallerImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
protected CharacterEscapeHandler createEscapeHandler( String encoding ) { if( escapeHandler!=null ) // user-specified one takes precedence. return escapeHandler; if( encoding.startsWith("UTF") ) // no need for character reference. Use the handler // optimized for that pattern. return MinimumEscapeHandler.theInstance; // otherwise try to find one from the encoding try { // try new JDK1.4 NIO return new NioEscapeHandler( getJavaEncoding(encoding) ); } catch( Throwable e ) { // if that fails, fall back to the dumb mode return DumbEscapeHandler.theInstance; } }
Example #15
Source File: IndentingUTF8XmlOutput.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * * @param indentStr * set to null for no indentation and optimal performance. * otherwise the string is used for indentation. */ public IndentingUTF8XmlOutput(OutputStream out, String indentStr, Encoded[] localNames, CharacterEscapeHandler escapeHandler) { super(out, localNames, escapeHandler); if(indentStr!=null) { Encoded e = new Encoded(indentStr); indent8 = new Encoded(); indent8.ensureSize(e.len*8); unitLen = e.len; for( int i=0; i<8; i++ ) System.arraycopy(e.buf, 0, indent8.buf, unitLen*i, unitLen); } else { this.indent8 = null; this.unitLen = 0; } }
Example #16
Source File: IndentingUTF8XmlOutput.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * * @param indentStr * set to null for no indentation and optimal performance. * otherwise the string is used for indentation. */ public IndentingUTF8XmlOutput(OutputStream out, String indentStr, Encoded[] localNames, CharacterEscapeHandler escapeHandler) { super(out, localNames, escapeHandler); if(indentStr!=null) { Encoded e = new Encoded(indentStr); indent8 = new Encoded(); indent8.ensureSize(e.len*8); unitLen = e.len; for( int i=0; i<8; i++ ) System.arraycopy(e.buf, 0, indent8.buf, unitLen*i, unitLen); } else { this.indent8 = null; this.unitLen = 0; } }
Example #17
Source File: UTF8XmlOutput.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * * @param localNames * local names encoded in UTF-8. */ public UTF8XmlOutput(OutputStream out, Encoded[] localNames, CharacterEscapeHandler escapeHandler) { this.out = out; this.localNames = localNames; for( int i=0; i<prefixes.length; i++ ) prefixes[i] = new Encoded(); this.escapeHandler = escapeHandler; }
Example #18
Source File: UTF8XmlOutput.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * * @param localNames * local names encoded in UTF-8. */ public UTF8XmlOutput(OutputStream out, Encoded[] localNames, CharacterEscapeHandler escapeHandler) { this.out = out; this.localNames = localNames; for( int i=0; i<prefixes.length; i++ ) prefixes[i] = new Encoded(); this.escapeHandler = escapeHandler; }
Example #19
Source File: C14nXmlOutput.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public C14nXmlOutput(OutputStream out, Encoded[] localNames, boolean namedAttributesAreOrdered, CharacterEscapeHandler escapeHandler) { super(out, localNames, escapeHandler); this.namedAttributesAreOrdered = namedAttributesAreOrdered; for( int i=0; i<staticAttributes.length; i++ ) staticAttributes[i] = new StaticAttribute(); }
Example #20
Source File: C14nXmlOutput.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public C14nXmlOutput(OutputStream out, Encoded[] localNames, boolean namedAttributesAreOrdered, CharacterEscapeHandler escapeHandler) { super(out, localNames, escapeHandler); this.namedAttributesAreOrdered = namedAttributesAreOrdered; for( int i=0; i<staticAttributes.length; i++ ) staticAttributes[i] = new StaticAttribute(); }
Example #21
Source File: UTF8XmlOutput.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * * @param localNames * local names encoded in UTF-8. */ public UTF8XmlOutput(OutputStream out, Encoded[] localNames, CharacterEscapeHandler escapeHandler) { this.out = out; this.localNames = localNames; for( int i=0; i<prefixes.length; i++ ) prefixes[i] = new Encoded(); this.escapeHandler = escapeHandler; }
Example #22
Source File: C14nXmlOutput.java From hottub with GNU General Public License v2.0 | 5 votes |
public C14nXmlOutput(OutputStream out, Encoded[] localNames, boolean namedAttributesAreOrdered, CharacterEscapeHandler escapeHandler) { super(out, localNames, escapeHandler); this.namedAttributesAreOrdered = namedAttributesAreOrdered; for( int i=0; i<staticAttributes.length; i++ ) staticAttributes[i] = new StaticAttribute(); }
Example #23
Source File: UTF8XmlOutput.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * * @param localNames * local names encoded in UTF-8. */ public UTF8XmlOutput(OutputStream out, Encoded[] localNames, CharacterEscapeHandler escapeHandler) { this.out = out; this.localNames = localNames; for( int i=0; i<prefixes.length; i++ ) prefixes[i] = new Encoded(); this.escapeHandler = escapeHandler; }
Example #24
Source File: C14nXmlOutput.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public C14nXmlOutput(OutputStream out, Encoded[] localNames, boolean namedAttributesAreOrdered, CharacterEscapeHandler escapeHandler) { super(out, localNames, escapeHandler); this.namedAttributesAreOrdered = namedAttributesAreOrdered; for( int i=0; i<staticAttributes.length; i++ ) staticAttributes[i] = new StaticAttribute(); }
Example #25
Source File: UTF8XmlOutput.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * * @param localNames * local names encoded in UTF-8. */ public UTF8XmlOutput(OutputStream out, Encoded[] localNames, CharacterEscapeHandler escapeHandler) { this.out = out; this.localNames = localNames; for( int i=0; i<prefixes.length; i++ ) prefixes[i] = new Encoded(); this.escapeHandler = escapeHandler; }
Example #26
Source File: C14nXmlOutput.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public C14nXmlOutput(OutputStream out, Encoded[] localNames, boolean namedAttributesAreOrdered, CharacterEscapeHandler escapeHandler) { super(out, localNames, escapeHandler); this.namedAttributesAreOrdered = namedAttributesAreOrdered; for( int i=0; i<staticAttributes.length; i++ ) staticAttributes[i] = new StaticAttribute(); }
Example #27
Source File: C14nXmlOutput.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public C14nXmlOutput(OutputStream out, Encoded[] localNames, boolean namedAttributesAreOrdered, CharacterEscapeHandler escapeHandler) { super(out, localNames, escapeHandler); this.namedAttributesAreOrdered = namedAttributesAreOrdered; for( int i=0; i<staticAttributes.length; i++ ) staticAttributes[i] = new StaticAttribute(); }
Example #28
Source File: UTF8XmlOutput.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * * @param localNames * local names encoded in UTF-8. */ public UTF8XmlOutput(OutputStream out, Encoded[] localNames, CharacterEscapeHandler escapeHandler) { this.out = out; this.localNames = localNames; for( int i=0; i<prefixes.length; i++ ) prefixes[i] = new Encoded(); this.escapeHandler = escapeHandler; }
Example #29
Source File: UTF8XmlOutput.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * * @param localNames * local names encoded in UTF-8. */ public UTF8XmlOutput(OutputStream out, Encoded[] localNames, CharacterEscapeHandler escapeHandler) { this.out = out; this.localNames = localNames; for( int i=0; i<prefixes.length; i++ ) prefixes[i] = new Encoded(); this.escapeHandler = escapeHandler; }
Example #30
Source File: C14nXmlOutput.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public C14nXmlOutput(OutputStream out, Encoded[] localNames, boolean namedAttributesAreOrdered, CharacterEscapeHandler escapeHandler) { super(out, localNames, escapeHandler); this.namedAttributesAreOrdered = namedAttributesAreOrdered; for( int i=0; i<staticAttributes.length; i++ ) staticAttributes[i] = new StaticAttribute(); }