Class NoteWriter

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class NoteWriter
    extends XmlWriter
    Class to write a collection of notes out to XML. The format is that of the note dump file with the addition of one attribute in the comment element to indicate if the comment is a new local comment that has not been uploaded to the OSM server yet.
    Since:
    7732
    • Field Summary

      • Fields inherited from class org.openstreetmap.josm.io.XmlWriter

        out
    • Constructor Summary

      Constructors 
      Constructor Description
      NoteWriter​(java.io.OutputStream out)
      Create a NoteWriter that will write to a given OutputStream.
      NoteWriter​(java.io.PrintWriter out)
      Create a NoteWriter that will write to the given PrintWriter
    • Constructor Detail

      • NoteWriter

        public NoteWriter​(java.io.PrintWriter out)
        Create a NoteWriter that will write to the given PrintWriter
        Parameters:
        out - PrintWriter to write XML to
      • NoteWriter

        public NoteWriter​(java.io.OutputStream out)
        Create a NoteWriter that will write to a given OutputStream.
        Parameters:
        out - OutputStream to write XML to
    • Method Detail

      • write

        public void write​(NoteData data)
        Write notes to designated output target
        Parameters:
        data - Note collection to write