private DataHandlerWriter getDataHandlerWriter() { // We only retrieve/create the DataHandlerWriter if necessary if (dataHandlerWriter == null) { dataHandlerWriter = XMLStreamWriterUtils.getDataHandlerWriter(writer); } return dataHandlerWriter; }
public void writeDTD(String rootName, String publicId, String systemId, String internalSubset) throws OutputException { try { XMLStreamWriterUtils.writeDTD(writer, rootName, publicId, systemId, internalSubset); } catch (XMLStreamException ex) { throw new StAXOutputException(ex); } }
DataHandlerWriter dataHandlerWriter = internalGetDataHandlerWriter(writer); if (dataHandlerWriter != null) { dataHandlerWriter.writeDataHandler(dataHandler, contentID, optimize); } else { writeBase64(writer, dataHandler);
XMLStreamWriterUtils.writeDataHandler(xmlWriter, localBase64Binary, null, true); } catch (IOException ex) { throw new XMLStreamException(ex);
/** * Get the {@link DataHandlerWriter} extension for a given {@link XMLStreamWriter}. If the * writer exposes the extension, a reference to the extension interface implementation is * returned. If the writer doesn't expose the extension, this method returns an instance of the * extension interface that emulates the extension (by writing the binary data as base64 * character data to the stream). * * @param writer * the stream for which the method should return the {@link DataHandlerWriter} * extension * @return a reference to the extension interface exposed by the writer or an implementation the * emulates the extension; the return value is never <code>null</code> */ public static DataHandlerWriter getDataHandlerWriter(final XMLStreamWriter writer) { DataHandlerWriter dataHandlerWriter = internalGetDataHandlerWriter(writer); if (dataHandlerWriter == null) { return new DataHandlerWriter() { public void writeDataHandler(DataHandler dataHandler, String contentID, boolean optimize) throws IOException, XMLStreamException { writeBase64(writer, dataHandler); } public void writeDataHandler(DataHandlerProvider dataHandlerProvider, String contentID, boolean optimize) throws IOException, XMLStreamException { writeBase64(writer, dataHandlerProvider.getDataHandler()); } }; } else { return dataHandlerWriter; } }
XMLStreamWriterUtils.writeDataHandler(xmlWriter, localBase64Binary, null, true); } catch (IOException ex) { throw new XMLStreamException(ex);
org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(xmlWriter, localRecord, null, true); } catch (java.io.IOException ex) { throw new javax.xml.stream.XMLStreamException("Unable to read data handler for record", ex);
private DataHandlerWriter getDataHandlerWriter() { // We only retrieve/create the DataHandlerWriter if necessary if (dataHandlerWriter == null) { dataHandlerWriter = XMLStreamWriterUtils.getDataHandlerWriter(writer); } return dataHandlerWriter; }
public void writeDTD(String rootName, String publicId, String systemId, String internalSubset) throws OutputException { try { XMLStreamWriterUtils.writeDTD(writer, rootName, publicId, systemId, internalSubset); } catch (XMLStreamException ex) { throw new StAXOutputException(ex); } }
/** * Write binary content to the stream. This method is similar to * {@link #writeDataHandler(XMLStreamWriter, DataHandler, String, boolean)}, * but supports deferred loading of the data handler. * * @param writer * the stream writer to write the data to * @param dataHandlerProvider * the binary content to write * @param contentID * an existing content ID for the binary data * @param optimize * indicates whether the content is eligible for optimization * @throws IOException * if an error occurs while reading from the data handler * @throws XMLStreamException * if an error occurs while writing to the underlying stream */ public static void writeDataHandler(XMLStreamWriter writer, DataHandlerProvider dataHandlerProvider, String contentID, boolean optimize) throws IOException, XMLStreamException { DataHandlerWriter dataHandlerWriter = internalGetDataHandlerWriter(writer); if (dataHandlerWriter != null) { dataHandlerWriter.writeDataHandler(dataHandlerProvider, contentID, optimize); } else { writeBase64(writer, dataHandlerProvider.getDataHandler()); } }
org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(xmlWriter, local_return, null, true); } catch (java.io.IOException ex) { throw new javax.xml.stream.XMLStreamException("Unable to read data handler for return", ex);
dataHandlerWriter = XMLStreamWriterUtils.getDataHandlerWriter(writer);
private void serializeDTD(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { DTDReader dtdReader; try { dtdReader = (DTDReader)reader.getProperty(DTDReader.PROPERTY); } catch (IllegalArgumentException ex) { dtdReader = null; } if (dtdReader == null) { throw new XMLStreamException("Cannot serialize the DTD because the XMLStreamReader doesn't support the DTDReader extension"); } XMLStreamWriterUtils.writeDTD(writer, dtdReader.getRootName(), dtdReader.getPublicId(), dtdReader.getSystemId(), reader.getText()); } }
org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(xmlWriter, local_return, null, true); } catch (java.io.IOException ex) { throw new javax.xml.stream.XMLStreamException("Unable to read data handler for return", ex);
org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(xmlWriter, local_return, null, true); } catch (java.io.IOException ex) { throw new javax.xml.stream.XMLStreamException("Unable to read data handler for return", ex);
org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(xmlWriter, local_return, null, true); } catch (java.io.IOException ex) { throw new javax.xml.stream.XMLStreamException("Unable to read data handler for return", ex);
org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(xmlWriter, localData, null, true); } catch (java.io.IOException ex) { throw new javax.xml.stream.XMLStreamException("Unable to read data handler for data", ex);
org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(xmlWriter, localDataHandler, null, true); } catch (java.io.IOException ex) { throw new javax.xml.stream.XMLStreamException("Unable to read data handler for dataHandler", ex);
org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(xmlWriter, localDataHandler, null, true); } catch (java.io.IOException ex) { throw new javax.xml.stream.XMLStreamException("Unable to read data handler for dataHandler", ex);
org.apache.axiom.util.stax.XMLStreamWriterUtils.writeDataHandler(xmlWriter, localContent, null, true); } catch (java.io.IOException ex) { throw new javax.xml.stream.XMLStreamException("Unable to read data handler for content", ex);