private static CharEscaperBuilder newBasicXmlEscapeBuilder() { return new CharEscaperBuilder() .addEscape('&', "&") .addEscape('<', "<") .addEscape('>', ">") .addEscapes(new char[] { '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\010', '\013', '\014', '\016', '\017', '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037'}, ""); }
/** * Add multiple mappings at once for a particular index. */ public CharEscaperBuilder addEscapes(char[] cs, String r) { for (char c : cs) { addEscape(c, r); } return this; }
/** * Convert this builder into a char escaper which is just a decorator * around the underlying array of replacement char[]s. * * @return an escaper that escapes based on the underlying array. */ public CharEscaper toEscaper() { return new CharArrayDecorator(toArray()); } }
/** * Add multiple mappings at once for a particular index. */ public CharEscaperBuilder addEscapes(char[] cs, String r) { for (char c : cs) { addEscape(c, r); } return this; }
/** * Convert this builder into a char escaper which is just a decorator * around the underlying array of replacement char[]s. * * @return an escaper that escapes based on the underlying array. */ public CharEscaper toEscaper() { return new CharArrayDecorator(toArray()); } }
private static CharEscaperBuilder newBasicXmlEscapeBuilder() { return new CharEscaperBuilder() .addEscape('&', "&") .addEscape('<', "<") .addEscape('>', ">") .addEscapes(new char[] { '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\010', '\013', '\014', '\016', '\017', '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037'}, ""); }
/** * Add multiple mappings at once for a particular index. */ public CharEscaperBuilder addEscapes(char[] cs, String r) { for (char c : cs) { addEscape(c, r); } return this; }
/** * Convert this builder into a char escaper which is just a decorator * around the underlying array of replacement char[]s. * * @return an escaper that escapes based on the underlying array. */ public CharEscaper toEscaper() { return new CharArrayDecorator(toArray()); } }
private static CharEscaperBuilder newBasicXmlEscapeBuilder() { return new CharEscaperBuilder() .addEscape('&', "&") .addEscape('<', "<") .addEscape('>', ">") .addEscapes(new char[] { '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\010', '\013', '\014', '\016', '\017', '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037'}, ""); }