Class IniSetting
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<IniElement>,Collection<IniElement>,List<IniElement>,RandomAccess,SequencedCollection<IniElement>
Ini数据,扩展
ArrayList <IniElement>
如果要向此ini添加空行,只需添加null
如果您想创建Ini,则可以Builder- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionIniSetting(int initialCapacity) IniSetting(Collection<? extends IniElement> c) -
Method Summary
Modifier and TypeMethodDescriptionto properties.toProperties(String delimiter) get properties.toString()voidwrite thetoString()value to File.voidwrite thetoString()value to File.voidwrite(OutputStream out, boolean withComment) write thetoString()value to output stream.voidwrite(OutputStream out, Charset charset, boolean withComment) write thetoString()value to output stream.voidwrite(PrintStream print, boolean withComment) write thetoString()value to PrintStream.voidwrite thetoString()value to Writer.voidwrite thetoString()value to Path(file).voidwrite thetoString()value to Path(file).Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAllMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
Constructor Details
-
IniSetting
public IniSetting() -
IniSetting
public IniSetting(int initialCapacity) -
IniSetting
-
-
Method Details
-
toString
- Overrides:
toStringin classAbstractCollection<IniElement>
-
toProperties
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=value2Suppose delimiter is'.'
se1.value1=value1 se1.value2=value2- Parameters:
delimiter- Connect the property value to the section value. if null, ignore section.- Returns:
- properties
-
toProperties
to properties. delimiter is '.'- Returns:
- properties
- See Also:
-
write
write thetoString()value to output stream.- Parameters:
out- output stream.charset- param forString.getBytes(Charset)withComment- write with comment- Throws:
IOException- io exception fromOutputStream.write(byte[])
-
write
write thetoString()value to output stream. charset is utf-8- Parameters:
out- output stream.withComment- write with comment- Throws:
IOException- io exception fromOutputStream.write(byte[])- See Also:
-
write
write thetoString()value to Writer.- Parameters:
writer- WriterwithComment- write with comment- Throws:
IOException- io exception fromWriter.write(String)
-
write
write thetoString()value to PrintStream.- Parameters:
print- PrintStreamwithComment- write with comment
-
write
write thetoString()value to File.- Parameters:
file- filecharset- charsetwithComment- write with comment- Throws:
IOException- io exception
-
write
write thetoString()value to File. charset is utf-8- Parameters:
file- filewithComment- write with comment- Throws:
IOException- io exception
-
write
write thetoString()value to Path(file).- Parameters:
path- pathcharset- charsetwithComment- write with comment- Throws:
IOException- io exception
-
write
write thetoString()value to Path(file). charset is utf-8- Parameters:
path- pathwithComment- write with comment- Throws:
IOException- io exception
-