public class IniSetting extends ArrayList<IniElement>
ArrayList <IniElement>
如果要向此ini添加空行,只需添加null
如果您想创建Ini,则可以BuildermodCount| Constructor and Description |
|---|
IniSetting() |
IniSetting(Collection<? extends IniElement> c) |
IniSetting(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
Properties |
toProperties()
to properties.
|
Properties |
toProperties(String delimiter)
get properties.
|
String |
toString() |
void |
write(File file,
boolean withComment)
write the
toString() value to File. |
void |
write(File file,
Charset charset,
boolean withComment)
write the
toString() value to File. |
void |
write(OutputStream out,
boolean withComment)
write the
toString() value to output stream. |
void |
write(OutputStream out,
Charset charset,
boolean withComment)
write the
toString() value to output stream. |
void |
write(Path path,
boolean withComment)
write the
toString() value to Path(file). |
void |
write(Path path,
Charset charset,
boolean withComment)
write the
toString() value to Path(file). |
void |
write(PrintStream print,
boolean withComment)
write the
toString() value to PrintStream. |
void |
write(Writer writer,
boolean withComment)
write the
toString() value to Writer. |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAllfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCodeparallelStream, streampublic IniSetting()
public IniSetting(int initialCapacity)
public IniSetting(Collection<? extends IniElement> c)
public String toString()
toString in class AbstractCollection<IniElement>public Properties toProperties(String delimiter)
get properties.
for example:
[se1] # section named 'se1'
# key 1
key1=value1
# key 2
key1=value2
[se2]
will be
se1${delimiter}value1=value1
se1${delimiter}value2=value2
Suppose delimiter is'.'
se1.value1=value1
se1.value2=value2
delimiter - Connect the property value to the section value. if null, ignore section.public Properties toProperties()
toProperties(String)public void write(OutputStream out, Charset charset, boolean withComment) throws IOException
toString() value to output stream.out - output stream.charset - param for String.getBytes(Charset)withComment - write with commentIOException - io exception from OutputStream.write(byte[])public void write(OutputStream out, boolean withComment) throws IOException
toString() value to output stream.
charset is utf-8out - output stream.withComment - write with commentIOException - io exception from OutputStream.write(byte[])write(OutputStream, Charset, boolean)public void write(Writer writer, boolean withComment) throws IOException
toString() value to Writer.writer - WriterwithComment - write with commentIOException - io exception from Writer.write(String)public void write(PrintStream print, boolean withComment)
toString() value to PrintStream.print - PrintStreamwithComment - write with commentpublic void write(File file, Charset charset, boolean withComment) throws IOException
toString() value to File.file - filecharset - charsetwithComment - write with commentIOException - io exceptionpublic void write(File file, boolean withComment) throws IOException
toString() value to File.
charset is utf-8file - filewithComment - write with commentIOException - io exceptionpublic void write(Path path, Charset charset, boolean withComment) throws IOException
toString() value to Path(file).path - pathcharset - charsetwithComment - write with commentIOException - io exceptionpublic void write(Path path, boolean withComment) throws IOException
toString() value to Path(file).
charset is utf-8path - pathwithComment - write with commentIOException - io exceptionCopyright © 2020. All rights reserved.