@Test public final void testContentBuffer2() { final XMLEscaper escaper = new FastOdsXMLEscaper(5); final String expected = "<ae"; final String actual = "&lt;ae"; Assert.assertEquals(actual, escaper.escapeXMLContent(expected)); }
@Override public String escapeXMLContent(final String s) { if (s == null) { return null; } final String cached = this.contentCacheMap.get(s); if (cached != null) { return cached; } final String escaped = this.getEscapedString(s, CHAR_SUBSTITUTES_IN_CONTENT); this.contentCacheMap.put(s, escaped); return escaped; }
FastOdsXMLEscaper implements XMLEscaper { @Override public String escapeXMLContent(final String s) { if (s == null) { return null; } final String cached = this.contentCacheMap.get(s); if (cached != null) { return cached; } final String escaped = this.getEscapedString(s, CHAR_SUBSTITUTES_IN_CONTENT); this.contentCacheMap.put(s, escaped); return escaped; } }
FastOdsXMLEscaper implements XMLEscaper { @Override public String escapeXMLContent(final String s) { if (s == null) { return null; } final String cached = this.contentCacheMap.get(s); if (cached != null) { return cached; } final String escaped = this.getEscapedString(s, CHAR_SUBSTITUTES_IN_CONTENT); this.contentCacheMap.put(s, escaped); return escaped; } FastOdsXMLEscaper(final int bufferSize); }
FastOdsXMLEscaper implements XMLEscaper { @Override public String escapeXMLContent(final String s) { if (s == null) { return null; } final String cached = this.contentCacheMap.get(s); if (cached != null) { return cached; } final String escaped = this.getEscapedString(s, CHAR_SUBSTITUTES_IN_CONTENT); this.contentCacheMap.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 escapeXMLContent(final String s) { if (s == null) { return null; } final String cached = this.contentCacheMap.get(s); if (cached != null) { return cached; } final String escaped = this.getEscapedString(s, CHAR_SUBSTITUTES_IN_CONTENT); this.contentCacheMap.put(s, escaped); return escaped; } FastOdsXMLEscaper(final int bufferSize); static FastOdsXMLEscaper create(); @Override String escapeXMLAttribute(final String s); @Override String escapeXMLContent(final String s);  }