protected final void writeNameUnchecked(String name) throws IOException { writeRaw(name, 0, name.length()); }
protected final void writeName(String name) throws IOException, XMLStreamException { if (mCheckNames) { verifyNameValidity(name, mNsAware); } // TODO: maybe we could reuse some previously encoded names? writeRaw(name, 0, name.length()); }
public void writeDTD(String data) throws IOException { if (mSurrogate != 0) { throwUnpairedSurrogate(); } writeRaw(data, 0, data.length()); }
public final void writePIStart(String target, boolean addSpace) throws IOException { writeAscii(BYTE_LT, BYTE_QMARK); writeRaw(target); if (addSpace) { writeAscii(BYTE_SPACE); } }
protected final void writeAscii(String str) throws IOException { if (mSurrogate != 0) { throwUnpairedSurrogate(); } int len = str.length(); int ptr = mOutputPtr; byte[] buf = mOutputBuffer; if ((ptr + len) >= buf.length) { /* It's even possible that String is longer than the buffer (not * likely, possible). If so, let's just call the full * method: */ if (len > buf.length) { writeRaw(str, 0, len); return; } flushBuffer(); ptr = mOutputPtr; } mOutputPtr += len; for (int i = 0; i < len; ++i) { buf[ptr++] = (byte)str.charAt(i); } }
public final void writeRawAscii(char[] buf, int offset, int len) throws IOException { if (mSurrogate != 0) { throwUnpairedSurrogate(); } int ptr = mOutputPtr; byte[] dst = mOutputBuffer; if ((ptr + len) >= dst.length) { if (len > dst.length) { writeRaw(buf, offset, len); return; } flushBuffer(); ptr = mOutputPtr; } mOutputPtr += len; for (int i = 0; i < len; ++i) { dst[ptr+i] = (byte)buf[offset+i]; } }
public void writeDTD(String rootName, String systemId, String publicId, String internalSubset) throws IOException, XMLStreamException { writeAscii("<!DOCTYPE "); writeAscii(rootName); if (systemId != null) { if (publicId != null) { writeAscii(" PUBLIC \""); writeRaw(publicId, 0, publicId.length()); writeAscii("\" \""); } else { writeAscii(" SYSTEM \""); } writeRaw(systemId, 0, systemId.length()); writeAscii(BYTE_QUOT); } // Hmmh. Should we output empty internal subset? if (internalSubset != null && internalSubset.length() > 0) { writeAscii(BYTE_SPACE, BYTE_LBRACKET); writeRaw(internalSubset, 0, internalSubset.length()); writeAscii(BYTE_RBRACKET); } writeAscii(BYTE_GT); }
public void writeXmlDeclaration(String version, String encoding, String standalone) throws IOException { final byte byQuote = (mUseDoubleQuotesInXmlDecl ? BYTE_QUOT : BYTE_APOS); writeAscii("<?xml version="); writeAscii(byQuote); writeAscii(version); writeAscii(byQuote); if (encoding != null && encoding.length() > 0) { writeAscii(" encoding="); writeAscii(byQuote); // Should be ascii, but let's play it safe: writeRaw(encoding, 0, encoding.length()); writeAscii(byQuote); } if (standalone != null) { writeAscii(" standalone="); writeAscii(byQuote); writeAscii(standalone); writeAscii(byQuote); } writeAscii(BYTE_QMARK, BYTE_GT); }
protected final void writeNameUnchecked(String name) throws IOException { writeRaw(name, 0, name.length()); }
protected final void writeNameUnchecked(String name) throws IOException { writeRaw(name, 0, name.length()); }
public void writeDTD(String data) throws IOException { if (mSurrogate != 0) { throwUnpairedSurrogate(); } writeRaw(data, 0, data.length()); }
public void writeDTD(String data) throws IOException { if (mSurrogate != 0) { throwUnpairedSurrogate(); } writeRaw(data, 0, data.length()); }
@Override public void writeDTD(String data) throws IOException { if (mSurrogate != 0) { throwUnpairedSurrogate(); } writeRaw(data, 0, data.length()); }
protected final void writeName(String name) throws IOException, XMLStreamException { if (mCheckNames) { verifyNameValidity(name, mNsAware); } // TODO: maybe we could reuse some previously encoded names? writeRaw(name, 0, name.length()); }
protected final void writeName(String name) throws IOException, XMLStreamException { if (mCheckNames) { verifyNameValidity(name, mNsAware); } // TODO: maybe we could reuse some previously encoded names? writeRaw(name, 0, name.length()); }
protected final void writeName(String name) throws IOException, XMLStreamException { if (mCheckNames) { verifyNameValidity(name, mNsAware); } // TODO: maybe we could reuse some previously encoded names? writeRaw(name, 0, name.length()); }
public final void writePIStart(String target, boolean addSpace) throws IOException { writeAscii(BYTE_LT, BYTE_QMARK); writeRaw(target); if (addSpace) { writeAscii(BYTE_SPACE); } }
public final void writePIStart(String target, boolean addSpace) throws IOException { writeAscii(BYTE_LT, BYTE_QMARK); writeRaw(target); if (addSpace) { writeAscii(BYTE_SPACE); } }
@Override public final void writePIStart(String target, boolean addSpace) throws IOException { writeAscii(BYTE_LT, BYTE_QMARK); writeRaw(target); if (addSpace) { writeAscii(BYTE_SPACE); } }
@Override public final void writePIStart(String target, boolean addSpace) throws IOException { writeAscii(BYTE_LT, BYTE_QMARK); writeRaw(target); if (addSpace) { writeAscii(BYTE_SPACE); } }