|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jagatoo.util.ini.IniWriter
public class IniWriter
The IniWriter writes ini files ;).
| Constructor Summary | |
|---|---|
IniWriter(java.io.File file)
|
|
IniWriter(java.io.OutputStream out)
|
|
IniWriter(java.lang.String filename)
|
|
IniWriter(java.io.Writer writer)
|
|
| Method Summary | |
|---|---|
void |
close()
Flushes and closes the file. |
int |
getMinCommentPosition()
Gets setting "minCommentPosition". |
int |
getMinEqualSignPosition()
Gets setting "minEqualSignPosition". |
int |
getMinValuePosition()
Gets setting "minValuePosition". |
boolean |
getPutSpacesAroundEqualSign()
Gets setting "putSpacesAroundEqualSign". |
int |
getSettingIndentSpaces()
Gets the number of spaces to indent settings by. |
boolean |
getSpaceGroup()
Gets setting "spaceGroup". |
void |
setMinCommentPosition(int minPos)
Configures the writer to put as many spaces before the comment, so that it is placed at least at the given column. |
void |
setMinEqualSignPosition(int minPos)
Configures the writer to put as many spaces before the equals sign, so that it is placed at least at the given column. |
void |
setMinValuePosition(int minPos)
Configures the writer to put as many spaces before the value, so that it is placed at least at the given column. |
void |
setPutSpacesAroundEqualSign(boolean b)
Configures the writer to put a spaces before and after the equal sign of a setting. |
void |
setSettingIndentSpaces(int numSpaces)
Sets the number of spaces to indent settings by. |
void |
setSpaceGroup(boolean b)
Configures the writer to put a spaces before and after the group name (between the brackets). |
void |
writeComment(java.lang.String comment)
Writes a new (standalone) comment to the file. |
void |
writeEmptyLine()
Writes an empty line to the file. |
void |
writeGroup(java.lang.String group)
Writes a new Group to the file. |
void |
writeSetting(java.lang.String key,
java.lang.Object value)
Writes a new setting to the next line. |
void |
writeSetting(java.lang.String key,
java.lang.Object value,
java.lang.String comment)
Writes a new setting to the next line. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IniWriter(java.io.Writer writer)
public IniWriter(java.io.OutputStream out)
public IniWriter(java.io.File file)
throws java.io.IOException
java.io.IOException
public IniWriter(java.lang.String filename)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public void setSettingIndentSpaces(int numSpaces)
numSpaces - public final int getSettingIndentSpaces()
public void setSpaceGroup(boolean b)
b - public final boolean getSpaceGroup()
public void setPutSpacesAroundEqualSign(boolean b)
b - public final boolean getPutSpacesAroundEqualSign()
public void setMinEqualSignPosition(int minPos)
minPos - (Use negative values for no specific rule.)public final int getMinEqualSignPosition()
public void setMinValuePosition(int minPos)
minPos - (Use negative values for no specific rule.)public final int getMinValuePosition()
public void setMinCommentPosition(int minPos)
minPos - (Use negative values for no specific rule.)public final int getMinCommentPosition()
public void writeGroup(java.lang.String group)
throws java.io.IOException
group -
java.io.IOException
public void writeSetting(java.lang.String key,
java.lang.Object value,
java.lang.String comment)
throws java.io.IOException
key - value - if this is not a number, it is quoted in double-quotes and then written using the toString() method.comment - null for no comment
java.io.IOException
public final void writeSetting(java.lang.String key,
java.lang.Object value)
throws java.io.IOException
key - value - if this is not a number, it is quoted in double-quotes and then written using the toString() method.
java.io.IOException
public void writeComment(java.lang.String comment)
throws java.io.IOException
comment -
java.io.IOException
public void writeEmptyLine()
throws java.io.IOException
java.io.IOException
public void close()
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||