private Document createDocument() { DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance("com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl", SAAJUtil.getSystemClassLoader()); try { final DocumentBuilder documentBuilder = docFactory.newDocumentBuilder(); return documentBuilder.newDocument(); } catch (ParserConfigurationException e) { throw new RuntimeException("Error creating xml document", e); } }
static String getDefaultMIMECharset() { if (defaultMIMECharset == null) { defaultMIMECharset = SAAJUtil.getSystemProperty("mail.mime.charset"); } if (defaultMIMECharset == null) defaultMIMECharset = mimeCharset(getDefaultJavaCharset()); return defaultMIMECharset; }
private static final boolean lazyContentLength; static { lazyContentLength = SAAJUtil.getSystemBoolean("saaj.lazy.contentlength");
lazyContentLength = SAAJUtil.getSystemBoolean("saaj.lazy.contentlength");
switchOffLazyAttachment = true; useMimePull = SAAJUtil.getSystemBoolean("saaj.use.mimepull");
public ParserPool(int capacity) { queue = new ArrayBlockingQueue<SAXParser>(capacity); factory = SAXParserFactory.newInstance("com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl", SAAJUtil.getSystemClassLoader()); try { factory.setFeature("jdk.xml.resetSymbolTable", true); } catch(SAXException | ParserConfigurationException e) { } factory.setNamespaceAware(true); for (int i = 0; i < capacity; i++) { try { queue.put(factory.newSAXParser()); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); throw new RuntimeException(ex); } catch (ParserConfigurationException ex) { throw new RuntimeException(ex); } catch (SAXException ex) { throw new RuntimeException(ex); } } }
ignoreMissingEndBoundary = SAAJUtil.getSystemBoolean("saaj.mime.multipart.ignoremissingendboundary");
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance("com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl", SAAJUtil.getSystemClassLoader()); factory.setNamespaceAware(true); DocumentBuilder builder = factory.newDocumentBuilder();