Class XmlRepomd

java.lang.Object
com.artipie.rpm.meta.XmlRepomd
All Implemented Interfaces:
Closeable, AutoCloseable

public final class XmlRepomd extends Object implements Closeable
XML repomd.xml metadata imperative writer.

This object is not thread safe and depends on order of method calls.

Since:
0.6
  • Constructor Details

    • XmlRepomd

      public XmlRepomd(Path path)
      Ctor.
      Parameters:
      path - Repomd path
    • XmlRepomd

      public XmlRepomd(OutputStream out)
      Ctor.
      Parameters:
      out - Repomd output stream
    • XmlRepomd

      public XmlRepomd(Path path, com.artipie.rpm.meta.XmlFile xml)
      Ctor.
      Parameters:
      path - Repomd path
      xml - Xml writer
  • Method Details

    • begin

      public void begin(long timestamp)
      Begin repomd.
      Parameters:
      timestamp - Current timestamp in seconds unix time.
    • beginData

      public XmlRepomd.Data beginData(String type) throws XMLStreamException
      Start repomd data.
      Parameters:
      type - Data type
      Returns:
      Data writer
      Throws:
      XMLStreamException - On error
    • file

      public Path file()
      Repomd file.
      Returns:
      File path
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable