Common .reg file for samples. The values uses many different registry types, just for demonstrating these. So "weight" property allways stored as REG_EXPAND_SZ, the "age" property stored as REG_DWORD, and the "fortuneNumber" stored as REG_MULTI_SZ. Don't worry if you not familiar with this terms, probably simple string values will work for you.
This file stored in UTF-16LE (Java charset name: "UnicodeLittle") encoding and the first line allways:
Windows Registry Editor Version 5.00
Next few lines just about tree structure
[HKEY_CURRENT_USER] [HKEY_CURRENT_USER\Software] [HKEY_CURRENT_USER\Software\ini4j-test] [HKEY_CURRENT_USER\Software\ini4j-test\dwarfs]
And the rest sections is the dwarfs. There is some coment before raw registry values to help reading cryptic hexadecimal values.
; bashful
; weight=45.7
; age=67
[HKEY_CURRENT_USER\Software\ini4j-test\dwarfs\bashful]
@="bashful"
"weight"=hex(2):34,00,35,00,2e,00,37,00,00,00
"height"="98.8"
"age"=dword:00000043
"homePage"="http://snowwhite.tale/~bashful"
"homeDir"="/home/bashful"
; doc
; weight=49.5
; age=63
[HKEY_CURRENT_USER\Software\ini4j-test\dwarfs\doc]
@="doc"
"weight"=hex(2):34,00,39,00,2e,00,35,00,00,00
"height"="87.7"
"age"=dword:0000003f
"homePage"="http://doc.dwarfs"
"homeDir"="c:Documents and Settingsdoc"
; dopey
; weight=${HKEY_CURRENT_USER\Software\ini4j-test\dwarfs\bashful/weight}
; age=23
; fortuneNumber=11
; fortuneNumber=33
; fortuneNumber=55
[HKEY_CURRENT_USER\Software\ini4j-test\dwarfs\dopey]
@="dopey"
"weight"=hex(2):24,00,7b,00,48,00,4b,00,45,00,59,00,5f,00,43,00,55,00,52,00,52,\
00,45,00,4e,00,54,00,5f,00,55,00,53,00,45,00,52,00,5c,00,53,00,\
6f,00,66,00,74,00,77,00,61,00,72,00,65,00,5c,00,69,00,6e,00,69,\
00,34,00,6a,00,2d,00,74,00,65,00,73,00,74,00,5c,00,64,00,77,00,\
61,00,72,00,66,00,73,00,5c,00,62,00,61,00,73,00,68,00,66,00,75,\
00,6c,00,2f,00,77,00,65,00,69,00,67,00,68,00,74,00,7d,00,00,00
"height"="${HKEY_CURRENT_USER\\Software\\ini4j-test\\dwarfs\\doc/height}"
"age"=dword:00000017
"homePage"="http://dopey.snowwhite.tale/"
"homeDir"="c:\\Documents and Settings\\dopey"
"fortuneNumber"=hex(7):31,00,31,00,00,00,32,00,32,00,00,00,35,00,35,00,00,00,\
00,00
; grumpy
; weight=65.3
; age=76
[HKEY_CURRENT_USER\Software\ini4j-test\dwarfs\grumpy]
@="grumpy"
"weight"=hex(2):36,00,35,00,2e,00,33,00,00,00
"height"="${HKEY_CURRENT_USER\\Software\\ini4j-test\\dwarfs\\dopey/height}"
"age"=dword:0000004c
"homePage"="http://snowwhite.tale/~grumpy/"
"homeDir"="/home/grumpy"
; happy
; weight=56.4
; age=99
[HKEY_CURRENT_USER\Software\ini4j-test\dwarfs\happy]
@="happy"
"weight"=hex(2):35,00,36,00,2e,00,34,00,00,00
"height"="77.66"
"age"=dword:00000063
"homePage"="http://happy.smurf"
"homeDir"="/home/happy"
; sleepy
; weight=76.11
; age=121
; fortuneNumber=99
[HKEY_CURRENT_USER\Software\ini4j-test\dwarfs\sleepy]
@="sleepy"
"weight"=hex(2):37,00,36,00,2e,00,31,00,31,00,00,00
"height"="${HKEY_CURRENT_USER\\Software\\ini4j-test\\dwarfs\\doc/height}8"
"age"=dword:00000079
"homePage"="http://snowwhite.tale/~sleepy"
"homeDir"="/home/sleepy"
"fortuneNumber"=hex(7):39,00,39,00,00,00,00,00
; sneezy
; weight=69.7
; age=64
; fortuneNumber=11
; fortuneNumber=22
; fortuneNumber=33
; fortuneNumber=44
[HKEY_CURRENT_USER\Software\ini4j-test\dwarfs\sneezy]
@="sneezy"
"weight"=hex(2):36,00,39,00,2e,00,37,00,00,00
"height"="76.88"
"age"=dword:00000040
"homePage"="${HKEY_CURRENT_USER\\Software\\ini4j-test\\dwarfs\\happy/homePage}/~sneezy"
"homeDir"="/home/sneezy"
"fortuneNumber"=hex(7):31,00,31,00,00,00,32,00,32,00,00,00,33,00,33,00,00,00,\
34,00,34,00,00,00,00,00