protected void outputStreamWrite(byte aByte) { outputStreamWrite(aByte, this.outputStream); }
protected void outputStreamWrite(byte[] bytes) { outputStreamWrite(bytes, this.outputStream); }
protected void outputStreamWrite(byte aByte) { outputStreamWrite(aByte, this.outputStream); }
protected void outputStreamWrite(byte[] bytes) { outputStreamWrite(bytes, this.outputStream); }
public void endElement(String namespaceURI, String localName, String qName) throws SAXException { try { if (isStartElementOpen) { outputStreamWrite((byte)'/'); outputStreamWrite((byte)'>'); } else { outputStreamWrite((byte) '<'); outputStreamWrite((byte) '/'); outputStreamWrite(qName.getBytes(Constants.DEFAULT_XML_ENCODING)); outputStreamWrite(CLOSE_ELEMENT); } isStartElementOpen = false; } catch (UnsupportedEncodingException e) { throw XMLMarshalException.marshalException(e); } }
/** * INTERNAL: */ public void element(XPathFragment frag) { if (isStartElementOpen) { outputStreamWrite(CLOSE_ELEMENT); isStartElementOpen = false; } outputStreamWrite(OPEN_START_ELEMENT); try { outputStreamWrite(getNameForFragment(frag).getBytes(Constants.DEFAULT_XML_ENCODING)); } catch (UnsupportedEncodingException e) { } outputStreamWrite((byte)'/'); outputStreamWrite((byte)'>'); }
protected void writeComment(char[] chars, int start, int length) { outputStreamWrite(OPEN_COMMENT); writeValue(new String(chars, start, length), false); outputStreamWrite(CLOSE_COMMENT); }
protected void writeComment(char[] chars, int start, int length) { outputStreamWrite(OPEN_COMMENT); writeValue(new String(chars, start, length), false); outputStreamWrite(CLOSE_COMMENT); }
/** * INTERNAL: */ public void attribute(String namespaceURI, String localName, String qName, String value) { try { outputStreamWrite(SPACE); outputStreamWrite(qName.getBytes(Constants.DEFAULT_XML_ENCODING)); outputStreamWrite((byte)'='); outputStreamWrite((byte)'"'); writeValue(value, true, true, this.outputStream); outputStreamWrite(CLOSE_ATTRIBUTE_VALUE); } catch (UnsupportedEncodingException e) { throw XMLMarshalException.marshalException(e); } }
/** * INTERNAL: */ public void attribute(String namespaceURI, String localName, String qName, String value) { try { outputStreamWrite(SPACE); outputStreamWrite(qName.getBytes(Constants.DEFAULT_XML_ENCODING)); outputStreamWrite((byte)'='); outputStreamWrite((byte)'"'); writeValue(value, true, true, this.outputStream); outputStreamWrite(CLOSE_ATTRIBUTE_VALUE); } catch (UnsupportedEncodingException e) { throw XMLMarshalException.marshalException(e); } }
/** * INTERNAL: */ public void cdata(String value) { try { if(isStartElementOpen) { isStartElementOpen = false; outputStreamWrite(CLOSE_ELEMENT); } for (String part : MarshalRecord.splitCData(value)) { outputStreamWrite(OPEN_CDATA); outputStreamWrite(part.getBytes(Constants.DEFAULT_XML_ENCODING)); outputStreamWrite(CLOSE_CDATA); } } catch(UnsupportedEncodingException e) { throw XMLMarshalException.marshalException(e); } }
public void comment(char[] ch, int start, int length) throws SAXException { if (isStartElementOpen) { outputStreamWrite(CLOSE_ELEMENT); isStartElementOpen = false; } writeComment(ch, start, length); }
public void comment(char[] ch, int start, int length) throws SAXException { if (isStartElementOpen) { outputStreamWrite(CLOSE_ELEMENT); isStartElementOpen = false; } writeComment(ch, start, length); }
/** * INTERNAL: */ public void characters(String value) { if (isStartElementOpen) { isStartElementOpen = false; outputStreamWrite(CLOSE_ELEMENT); } writeValue(value, true); }
/** * INTERNAL: */ public void characters(String value) { if (isStartElementOpen) { isStartElementOpen = false; outputStreamWrite(CLOSE_ELEMENT); } writeValue(value, true); }
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { try { if (isStartElementOpen) { outputStreamWrite(CLOSE_ELEMENT); } outputStreamWrite(OPEN_START_ELEMENT); outputStreamWrite(qName.getBytes(Constants.DEFAULT_XML_ENCODING)); isStartElementOpen = true; // Handle attributes handleAttributes(atts); // Handle prefix mappings writePrefixMappings(); } catch (IOException e) { throw XMLMarshalException.marshalException(e); } }
public void characters(CharSequence characters) throws SAXException { if (isProcessingCData) { cdata(characters.toString()); return; } if (isStartElementOpen) { outputStreamWrite(CLOSE_ELEMENT); isStartElementOpen = false; } writeValue(characters.toString(), true); }
/** * INTERNAL */ public void writeHeader() { outputStreamWrite(getMarshaller().getXmlHeader().getBytes()); }
/** * INTERNAL */ public void writeHeader() { outputStreamWrite(getMarshaller().getXmlHeader().getBytes()); }
public void characters(CharSequence characters) throws SAXException { if (isProcessingCData) { cdata(characters.toString()); return; } if (isStartElementOpen) { outputStreamWrite(CLOSE_ELEMENT); isStartElementOpen = false; } writeValue(characters.toString(), true); }