public static XMLExtendedStreamWriter create(XMLStreamWriter writer) throws Exception { return new FormattingXMLStreamWriter(writer); } }
public static XMLExtendedStreamWriter create(XMLStreamWriter writer) throws Exception { return new FormattingXMLStreamWriter(writer); } }
public static XMLExtendedStreamWriter create(XMLStreamWriter writer) throws Exception { return new FormattingXMLStreamWriter(writer); } }
public static XMLExtendedStreamWriter create(XMLStreamWriter writer) throws CommandLineException { try { return new FormattingXMLStreamWriter(writer); } catch (Exception e) { throw new CommandLineException("Failed to create xml stream writer.", e); } }
public static XMLExtendedStreamWriter create(XMLStreamWriter writer) throws CommandLineException { try { return new FormattingXMLStreamWriter(writer); } catch (Exception e) { throw new CommandLineException("Failed to create xml stream writer.", e); } }
private String getXML(DeploymentUnit deploymentUnit) throws XMLStreamException { ModelNode node = Configuration.INSTANCE.getSecureDeployment(deploymentUnit); if (node != null) { KeycloakSubsystemParser writer = new KeycloakSubsystemParser(); ByteArrayOutputStream output = new ByteArrayOutputStream(); XMLExtendedStreamWriter streamWriter = new FormattingXMLStreamWriter(XMLOutputFactory.newInstance().createXMLStreamWriter(output)); try { streamWriter.writeStartElement("keycloak-saml-adapter"); writer.writeSps(streamWriter, node); streamWriter.writeEndElement(); } finally { streamWriter.close(); } return new String(output.toByteArray(), Charset.forName("utf-8")); } return null; }