Class Properties.PropertiesWriter

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable
    Enclosing class:
    Properties

    public static class Properties.PropertiesWriter
    extends java.io.FilterWriter
    This class is used to write properties lines.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean typed  
      • Fields inherited from class java.io.FilterWriter

        out
      • Fields inherited from class java.io.Writer

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertiesWriter​(java.io.Writer writer, boolean typed)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void writeln​(java.lang.String s)
      Helper method for writing a line with the platform specific line ending.
      void writeProperty​(java.lang.String key, java.lang.String value)
      Writes the given property and its value.
      • Methods inherited from class java.io.FilterWriter

        close, flush, write, write, write
      • Methods inherited from class java.io.Writer

        append, append, append, nullWriter, write, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • typed

        private boolean typed
    • Constructor Detail

      • PropertiesWriter

        public PropertiesWriter​(java.io.Writer writer,
                                boolean typed)
        Constructor.
        Parameters:
        writer - a Writer object providing the underlying stream
    • Method Detail

      • writeProperty

        public void writeProperty​(java.lang.String key,
                                  java.lang.String value)
                           throws java.io.IOException
        Writes the given property and its value.
        Parameters:
        key - the property key
        value - the property value
        Throws:
        java.io.IOException - if an error occurs
      • writeln

        public void writeln​(java.lang.String s)
                     throws java.io.IOException
        Helper method for writing a line with the platform specific line ending.
        Parameters:
        s - the content of the line (may be null)
        Throws:
        java.io.IOException - if an error occurs