public void writeEnc(Writer w) throws IOException { w.write("<!ENTITY "); w.write(mName); w.write(" \""); TextEscaper.outputDTDText(w, mRepl, 0, mRepl.length); w.write("\">"); }
protected void outputNsAndAttr(Writer w) throws IOException { if (mNsCtxt != null) { mNsCtxt.outputNamespaceDeclarations(w); } String[] raw = mRawAttrs; if (raw != null) { for (int i = 0, len = raw.length; i < len; i += 4) { w.write(' '); String prefix = raw[i + OFFSET_NS_PREFIX]; if (prefix != null && prefix.length() > 0) { w.write(prefix); w.write(':'); } w.write(raw[i]); // local name w.write("=\""); TextEscaper.writeEscapedAttrValue(w, raw[i + OFFSET_VALUE]); w.write('"'); } } }
public static Writer constructTextWriter(Writer w, String enc) throws UnsupportedEncodingException { int bitSize = guessEncodingBitSize(enc); /* Anything less than full 16-bits (Unicode) needs to use a * Writer that can do escaping... simplistic, but should cover * usual cases (7-bit [ascii], 8-bit [ISO-Latin]). */ if (bitSize < 16) { return new SingleByteTextWriter(w, enc, (1 << bitSize)); } return new UTFTextWriter(w, enc, true); }
public void writeAsEncodedUnicode(Writer w) throws XMLStreamException { try { if (mIsCData) { w.write("<![CDATA["); w.write(mContent); w.write("]]>"); } else { TextEscaper.writeEscapedXMLText(w, mContent); } } catch (IOException ie) { throwFromIOE(ie); } }
public static Writer constructTextWriter(Writer w, String enc) throws UnsupportedEncodingException { int bitSize = guessEncodingBitSize(enc); /* Anything less than full 16-bits (Unicode) needs to use a * Writer that can do escaping... simplistic, but should cover * usual cases (7-bit [ascii], 8-bit [ISO-Latin]). */ if (bitSize < 16) { return new SingleByteTextWriter(w, enc, (1 << bitSize)); } return new UTFTextWriter(w, enc, true); }
public void writeAsEncodedUnicode(Writer w) throws XMLStreamException { try { if (mIsCData) { w.write("<![CDATA["); w.write(mContent); w.write("]]>"); } else { TextEscaper.writeEscapedXMLText(w, mContent); } } catch (IOException ie) { throwFromIOE(ie); } }
String val = attr.getValue(); if (val != null && val.length() > 0) { TextEscaper.writeEscapedAttrValue(w, val);
public void writeEnc(Writer w) throws IOException { w.write("<!ENTITY "); w.write(mName); w.write(" \""); TextEscaper.outputDTDText(w, mRepl, 0, mRepl.length); w.write("\">"); }
public static Writer constructTextWriter(Writer w, String enc) throws UnsupportedEncodingException { int bitSize = guessEncodingBitSize(enc); /* Anything less than full 16-bits (Unicode) needs to use a * Writer that can do escaping... simplistic, but should cover * usual cases (7-bit [ascii], 8-bit [ISO-Latin]). */ if (bitSize < 16) { return new SingleByteTextWriter(w, enc, (1 << bitSize)); } return new UTFTextWriter(w, enc, true); }
public void writeAsEncodedUnicode(Writer w) throws XMLStreamException { try { if (mIsCData) { w.write("<![CDATA["); w.write(mContent); w.write("]]>"); } else { TextEscaper.writeEscapedXMLText(w, mContent); } } catch (IOException ie) { throwFromIOE(ie); } }
protected void outputNsAndAttr(Writer w) throws IOException { if (mNsCtxt != null) { mNsCtxt.outputNamespaceDeclarations(w); } String[] raw = mRawAttrs; if (raw != null) { for (int i = 0, len = raw.length; i < len; i += 4) { w.write(' '); String prefix = raw[i + OFFSET_NS_PREFIX]; if (prefix != null && prefix.length() > 0) { w.write(prefix); w.write(':'); } w.write(raw[i]); // local name w.write("=\""); TextEscaper.writeEscapedAttrValue(w, raw[i + OFFSET_VALUE]); w.write('"'); } } }
@Override public void writeEnc(Writer w) throws IOException { w.write("<!ENTITY "); w.write(mName); w.write(" \""); TextEscaper.outputDTDText(w, mRepl, 0, mRepl.length); w.write("\">"); }
public static Writer constructAttrValueWriter(Writer w, String enc, char qchar) throws UnsupportedEncodingException { int bitSize = guessEncodingBitSize(enc); /* Anything less than full 16-bits (Unicode) needs to use a * Writer that can do escaping... simplistic, but should cover * usual cases (7-bit [ascii], 8-bit [ISO-Latin]). */ if (bitSize < 16) { return new SingleByteAttrValueWriter(w, enc, qchar, (1 << bitSize)); } return new UTFAttrValueWriter(w, enc, qchar, true); }
public void writeAsEncodedUnicode(Writer w) throws XMLStreamException { /* Specs don't really specify exactly what to output... but * let's do a reasonable guess: */ String prefix = mName.getPrefix(); try { if (prefix != null && prefix.length() > 0) { w.write(prefix); w.write(':'); } w.write(mName.getLocalPart()); w.write('='); w.write('"'); TextEscaper.writeEscapedAttrValue(w, mValue); w.write('"'); } catch (IOException ie) { throwFromIOE(ie); } }
public void writeEnc(Writer w) throws IOException { w.write("<!ENTITY "); w.write(mName); w.write(" \""); TextEscaper.outputDTDText(w, mRepl, 0, mRepl.length); w.write("\">"); }
public static Writer constructAttrValueWriter(Writer w, String enc, char qchar) throws UnsupportedEncodingException { int bitSize = guessEncodingBitSize(enc); /* Anything less than full 16-bits (Unicode) needs to use a * Writer that can do escaping... simplistic, but should cover * usual cases (7-bit [ascii], 8-bit [ISO-Latin]). */ if (bitSize < 16) { return new SingleByteAttrValueWriter(w, enc, qchar, (1 << bitSize)); } return new UTFAttrValueWriter(w, enc, qchar, true); }
@Override protected void outputNsAndAttr(Writer w) throws IOException { if (mNsCtxt != null) { mNsCtxt.outputNamespaceDeclarations(w); } String[] raw = mRawAttrs; if (raw != null) { for (int i = 0, len = raw.length; i < len; i += 4) { w.write(' '); String prefix = raw[i + OFFSET_NS_PREFIX]; if (prefix != null && prefix.length() > 0) { w.write(prefix); w.write(':'); } w.write(raw[i]); // local name w.write("=\""); TextEscaper.writeEscapedAttrValue(w, raw[i + OFFSET_VALUE]); w.write('"'); } } }
@Override public void writeEnc(Writer w) throws IOException { w.write("<!ENTITY "); w.write(mName); w.write(" \""); TextEscaper.outputDTDText(w, mRepl, 0, mRepl.length); w.write("\">"); }
public static Writer constructAttrValueWriter(Writer w, String enc, char qchar) throws UnsupportedEncodingException { int bitSize = guessEncodingBitSize(enc); /* Anything less than full 16-bits (Unicode) needs to use a * Writer that can do escaping... simplistic, but should cover * usual cases (7-bit [ascii], 8-bit [ISO-Latin]). */ if (bitSize < 16) { return new SingleByteAttrValueWriter(w, enc, qchar, (1 << bitSize)); } return new UTFAttrValueWriter(w, enc, qchar, true); }
protected void outputNsAndAttr(Writer w) throws IOException { if (mNsCtxt != null) { mNsCtxt.outputNamespaceDeclarations(w); } String[] raw = mRawAttrs; if (raw != null) { for (int i = 0, len = raw.length; i < len; i += 4) { w.write(' '); String prefix = raw[i + OFFSET_NS_PREFIX]; if (prefix != null && prefix.length() > 0) { w.write(prefix); w.write(':'); } w.write(raw[i]); // local name w.write("=\""); TextEscaper.writeEscapedAttrValue(w, raw[i + OFFSET_VALUE]); w.write('"'); } } }