public static String toXML(AuditMessage message, boolean format) throws IOException { return toXML(message, format, "UTF-8", SCHEMA_URI); }
public static String toXML(AuditMessage message, boolean format, String encoding) throws IOException { return toXML(message, format, encoding, SCHEMA_URI); }
public static String toXML(AuditMessage message) throws IOException { return toXML(message, false, "UTF-8", SCHEMA_URI); }
public static void toXML(AuditMessage message, OutputStream os) throws IOException { toXML(message, os, false, "UTF-8", SCHEMA_URI); }
public static String toXML(AuditMessage message) throws IOException { return toXML(message, false, "UTF-8", SCHEMA_URI); }
public static String toXML(AuditMessage message, boolean format) throws IOException { return toXML(message, format, "UTF-8", SCHEMA_URI); }
public static String toXML(AuditMessage message, boolean format, String encoding) throws IOException { return toXML(message, format, encoding, SCHEMA_URI); }
public static void toXML(AuditMessage message, OutputStream os, boolean format) throws IOException { toXML(message, os, format, "UTF-8", SCHEMA_URI); }
public static void toXML(AuditMessage message, OutputStream os) throws IOException { toXML(message, os, false, "UTF-8", SCHEMA_URI); }
public static void toXML(AuditMessage message, OutputStream os, boolean format) throws IOException { toXML(message, os, format, "UTF-8", SCHEMA_URI); }
public static String toXML(AuditMessage message, boolean format, String encoding, String schemaURL) throws IOException { ByteArrayOutputStream os = new ByteArrayOutputStream(256); toXML(message, os, format, encoding, schemaURL); return os.toString(encoding); }
public static String toXML(AuditMessage message, boolean format, String encoding, String schemaURL) throws IOException { ByteArrayOutputStream os = new ByteArrayOutputStream(256); toXML(message, os, format, encoding, schemaURL); return os.toString(encoding); }
DatagramPacket createMessage(Calendar timeStamp, AuditMessage msg) { try { reset(); writeHeader(severityOf(msg), timeStamp); AuditMessages.toXML(msg, builder, formatXML, encoding, schemaURI); } catch (IOException e) { assert false : e; } return new DatagramPacket(buf, 0, count); }
DatagramPacket createMessage(Calendar timeStamp, AuditMessage msg) { try { reset(); writeHeader(severityOf(msg), timeStamp); AuditMessages.toXML(msg, builder, formatXML, encoding, schemaURI); } catch (IOException e) { assert false : e; } return new DatagramPacket(buf, 0, count); }
public static void toXML(AuditMessage message, OutputStream os, boolean format, String encoding, String schemaURI) throws IOException { try { Marshaller m = jc().createMarshaller(); if (format) m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); if (schemaURI != null) m.setProperty(Marshaller.JAXB_NO_NAMESPACE_SCHEMA_LOCATION, schemaURI); if (encoding != null) m.setProperty(Marshaller.JAXB_ENCODING, encoding); m.marshal(of.createAuditMessage(message), os ); } catch( JAXBException jbe ){ if (jbe.getLinkedException() instanceof IOException) throw (IOException) jbe.getLinkedException(); throw new IllegalStateException(jbe); } }
public static void toXML(AuditMessage message, OutputStream os, boolean format, String encoding, String schemaURI) throws IOException { try { Marshaller m = jc().createMarshaller(); if (format) m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); if (schemaURI != null) m.setProperty(Marshaller.JAXB_NO_NAMESPACE_SCHEMA_LOCATION, schemaURI); if (encoding != null) m.setProperty(Marshaller.JAXB_ENCODING, encoding); m.marshal(of.createAuditMessage(message), os ); } catch( JAXBException jbe ){ if (jbe.getLinkedException() instanceof IOException) throw (IOException) jbe.getLinkedException(); throw new IllegalStateException(jbe); } }