@Override public void text(Pcdata value, boolean needsSeparatingWhitespace) throws IOException { if (needsSeparatingWhitespace) fiout.writeLowLevelText(" "); /* * Check if the CharSequence is from a base64Binary data type */ if (!(value instanceof Base64Data)) { final int len = value.length(); if(len <buf.length) { value.writeTo(buf, 0); fiout.writeLowLevelText(buf, len); } else { fiout.writeLowLevelText(value.toString()); } } else { final Base64Data dataValue = (Base64Data)value; // Write out the octets using the base64 encoding algorithm fiout.writeLowLevelOctets(dataValue.get(), dataValue.getDataLen()); } }
public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException { if(value instanceof Base64Data && !serializer.getInlineBinaryFlag()) { Base64Data b64d = (Base64Data) value; String cid; if(b64d.hasData()) cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.get(),0,b64d.getDataLen(),b64d.getMimeType(),nsUri,localName); else cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.getDataHandler(),nsUri,localName); if(cid!=null) { nsContext.getCurrent().push(); int prefix = nsContext.declareNsUri(WellKnownNamespace.XOP,"xop",false); beginStartTag(prefix,"Include"); attribute(-1,"href",cid); endStartTag(); endTag(prefix,"Include"); nsContext.getCurrent().pop(); return; } } next.text(value, needsSeparatingWhitespace); } }
@Override public void text(Pcdata value, boolean needsSeparatingWhitespace) throws IOException { if (needsSeparatingWhitespace) fiout.writeLowLevelText(" "); /* * Check if the CharSequence is from a base64Binary data type */ if (!(value instanceof Base64Data)) { final int len = value.length(); if(len <buf.length) { value.writeTo(buf, 0); fiout.writeLowLevelText(buf, len); } else { fiout.writeLowLevelText(value.toString()); } } else { final Base64Data dataValue = (Base64Data)value; // Write out the octets using the base64 encoding algorithm fiout.writeLowLevelOctets(dataValue.get(), dataValue.getDataLen()); } }
public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException { if(value instanceof Base64Data && !serializer.getInlineBinaryFlag()) { Base64Data b64d = (Base64Data) value; String cid; if(b64d.hasData()) cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.get(),0,b64d.getDataLen(),b64d.getMimeType(),nsUri,localName); else cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.getDataHandler(),nsUri,localName); if(cid!=null) { nsContext.getCurrent().push(); int prefix = nsContext.declareNsUri(WellKnownNamespace.XOP,"xop",false); beginStartTag(prefix,"Include"); attribute(-1,"href",cid); endStartTag(); endTag(prefix,"Include"); nsContext.getCurrent().pop(); return; } } next.text(value, needsSeparatingWhitespace); } }
@Override public void text(Pcdata value, boolean needsSeparatingWhitespace) throws IOException { if (needsSeparatingWhitespace) fiout.writeLowLevelText(" "); /* * Check if the CharSequence is from a base64Binary data type */ if (!(value instanceof Base64Data)) { final int len = value.length(); if(len <buf.length) { value.writeTo(buf, 0); fiout.writeLowLevelText(buf, len); } else { fiout.writeLowLevelText(value.toString()); } } else { final Base64Data dataValue = (Base64Data)value; // Write out the octets using the base64 encoding algorithm fiout.writeLowLevelOctets(dataValue.get(), dataValue.getDataLen()); } }
@Override public void text(Pcdata value, boolean needsSeparatingWhitespace) throws IOException { if (needsSeparatingWhitespace) fiout.writeLowLevelText(" "); /* * Check if the CharSequence is from a base64Binary data type */ if (!(value instanceof Base64Data)) { final int len = value.length(); if(len <buf.length) { value.writeTo(buf, 0); fiout.writeLowLevelText(buf, len); } else { fiout.writeLowLevelText(value.toString()); } } else { final Base64Data dataValue = (Base64Data)value; // Write out the octets using the base64 encoding algorithm fiout.writeLowLevelOctets(dataValue.get(), dataValue.getDataLen()); } }
public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException { if(value instanceof Base64Data && !serializer.getInlineBinaryFlag()) { Base64Data b64d = (Base64Data) value; String cid; if(b64d.hasData()) cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.get(),0,b64d.getDataLen(),b64d.getMimeType(),nsUri,localName); else cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.getDataHandler(),nsUri,localName); if(cid!=null) { nsContext.getCurrent().push(); int prefix = nsContext.declareNsUri(WellKnownNamespace.XOP,"xop",false); beginStartTag(prefix,"Include"); attribute(-1,"href",cid); endStartTag(); endTag(prefix,"Include"); nsContext.getCurrent().pop(); return; } } next.text(value, needsSeparatingWhitespace); } }
public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException { if(value instanceof Base64Data && !serializer.getInlineBinaryFlag()) { Base64Data b64d = (Base64Data) value; String cid; if(b64d.hasData()) cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.get(),0,b64d.getDataLen(),b64d.getMimeType(),nsUri,localName); else cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.getDataHandler(),nsUri,localName); if(cid!=null) { nsContext.getCurrent().push(); int prefix = nsContext.declareNsUri(WellKnownNamespace.XOP,"xop",false); beginStartTag(prefix,"Include"); attribute(-1,"href",cid); endStartTag(); endTag(prefix,"Include"); nsContext.getCurrent().pop(); return; } } next.text(value, needsSeparatingWhitespace); } }