@Test public final void testAttrBuffer2() { final XMLEscaper escaper = new FastOdsXMLEscaper(5); final String actual = "<ae"; final String expected = "&lt;ae"; Assert.assertEquals(expected, escaper.escapeXMLAttribute(actual)); }
@Override public String escapeXMLAttribute(final String s) { if (s == null) { return null; } final String cached = this.attrCacheMap.get(s); if (cached != null) { return cached; } final String escaped = this.getEscapedString(s, CHAR_SUBSTITUTES_IN_ATTRIBUTE); this.attrCacheMap.put(s, escaped); return escaped; }
FastOdsXMLEscaper implements XMLEscaper { @Override public String escapeXMLAttribute(final String s) { if (s == null) { return null; } final String cached = this.attrCacheMap.get(s); if (cached != null) { return cached; } final String escaped = this.getEscapedString(s, CHAR_SUBSTITUTES_IN_ATTRIBUTE); this.attrCacheMap.put(s, escaped); return escaped; } }
FastOdsXMLEscaper implements XMLEscaper { @Override public String escapeXMLAttribute(final String s) { if (s == null) { return null; } final String cached = this.attrCacheMap.get(s); if (cached != null) { return cached; } final String escaped = this.getEscapedString(s, CHAR_SUBSTITUTES_IN_ATTRIBUTE); this.attrCacheMap.put(s, escaped); return escaped; } FastOdsXMLEscaper(final int bufferSize); }
FastOdsXMLEscaper implements XMLEscaper { @Override public String escapeXMLAttribute(final String s) { if (s == null) { return null; } final String cached = this.attrCacheMap.get(s); if (cached != null) { return cached; } final String escaped = this.getEscapedString(s, CHAR_SUBSTITUTES_IN_ATTRIBUTE); this.attrCacheMap.put(s, escaped); return escaped; } FastOdsXMLEscaper(final int bufferSize); static FastOdsXMLEscaper create(); @Override String escapeXMLAttribute(final String s); @Override String escapeXMLContent(final String s); }
FastOdsXMLEscaper implements XMLEscaper { @Override public String escapeXMLAttribute(final String s) { if (s == null) { return null; } final String cached = this.attrCacheMap.get(s); if (cached != null) { return cached; } final String escaped = this.getEscapedString(s, CHAR_SUBSTITUTES_IN_ATTRIBUTE); this.attrCacheMap.put(s, escaped); return escaped; } FastOdsXMLEscaper(final int bufferSize); static FastOdsXMLEscaper create(); @Override String escapeXMLAttribute(final String s); @Override String escapeXMLContent(final String s);  }