@Nonnull public static InputSource create (@Nonnull final ByteBuffer aXML) { return create (new ByteBufferInputStream (aXML)); }
@Nonnull public static StreamSource create (@Nonnull final ByteBuffer aXML) { return create (new ByteBufferInputStream (aXML)); }
/** * Read a document from the specified byte buffer. The secure reading feature * has affect when using this method. * * @param aXML * The XML bytes to read. May not be <code>null</code>. * @return <code>null</code> in case reading fails. */ @Nullable default JAXBTYPE read (@Nonnull final ByteBuffer aXML) { ValueEnforcer.notNull (aXML, "XML"); // Ensure to use InputStream for BOM handling return read (new ByteBufferInputStream (aXML)); }