public class INIFileReadWrite extends INIFileReader
INIFileReader.JITLoader
defaultsection, IFR_DEFAULT_MAP_SECTION, IFR_DEFAULT_MAP_SECTION_COMMAND, IFR_MEMORY_MODE_MAPPED, IFR_MEMORY_MODE_STORED, ignoreItemCase, jit, jitstop, memorymode, sections
Constructor and Description |
---|
INIFileReadWrite() |
INIFileReadWrite(java.io.File file,
int memorymode) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the JIT and file reader (if still open).
|
void |
finalize() |
protected void |
saveINIFileWithANSIorUTF8(java.io.File alternate,
boolean isUTF8format)
Called by writeINIFile(File) and writeUTF8INIFile(File)
|
void |
setAppMapItem(java.lang.String section,
java.lang.String item,
java.lang.String value)
Set/Change a new or existing INI value.
|
void |
writeINIFile(java.io.File alternate)
Write the (modified) INI File contents to file.
|
protected void |
writeSection(java.io.BufferedWriter writer,
java.lang.String section,
CaseInsensitiveHashtable items)
Output an INI file [section] to the writer.
|
void |
writeUTF8INIFile(java.io.File alternate)
Write the (modified) INI File contents to file formatted with UTF-8.
|
clearCache, clearHashtables, closeJIT, getAppMapItem, getDefaultSection, getItem, getItems, getMode, getNewHashtable, getSections, setDefaultSection, tryJITLoader
closeReader, getFilename, getFullpath, isClosed, isEOF, open, openFile, openStream, readLine, resetpointers, setFile, setStream
public INIFileReadWrite()
INIFileReader.INIFileReader()
public INIFileReadWrite(java.io.File file, int memorymode)
INIFileReader.INIFileReader(File, int)
public void setAppMapItem(java.lang.String section, java.lang.String item, java.lang.String value)
section
- section to receive value. If null or 0-length the item will be
stored in the first unnamed section. The section names are not case-sensitive.item
- to receive the specified value. null or 0-length item names will be
ignored and the routine will return without error. The item names are not case-sensitive.value
- of the item. null values will be ignored and the routine will return
without error. 0-length values (empty strings) are allowed. Note: values are not
automatically wrapped in single or double quotes. So if the value as written to file
should contain quotes they need to already be part of the value provided.writeINIFile(File)
,
INIFileReader.clearCache()
public void writeINIFile(java.io.File alternate)
alternate
- optional File object to write the information to a File other than
the one originally read in. A null value will result in writing back (overwriting) the
same file we read in.public void writeUTF8INIFile(java.io.File alternate)
writeINIFile(File)
protected void saveINIFileWithANSIorUTF8(java.io.File alternate, boolean isUTF8format)
alternate
- alternate optional File object.isUTF8format
- true, write file with UTF8 format; false, write file with ANSI format.#writeUTF8INIFile(File)
protected void writeSection(java.io.BufferedWriter writer, java.lang.String section, CaseInsensitiveHashtable items)
public void close()
close
in class INIFileReader
INIFileReader.closeJIT()
,
FileLineReader.closeReader()
public void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
Copyright © SAS Institute. All Rights Reserved.