Though java.util.properties
allows reading and writing properties file, the writing does not preserve the formatting. Not surprising, because it is not tied to the property file.
Is there a PropertyFile
class out there -- or some such -- that preserves comments and blank lines and updates property values in place?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…