/usr/share/doc/libosgi-compendium-java/api/org/osgi/service/prefs/Preferences.html is in libosgi-compendium-java-doc 5.0.0-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html>
<head>
<!-- Generated by javadoc -->
<title>Preferences</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Preferences";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6,"i25":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../org/osgi/service/prefs/PreferencesService.html" title="interface in org.osgi.service.prefs"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/osgi/service/prefs/Preferences.html" target="_top">Frames</a></li>
<li><a href="Preferences.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.osgi.service.prefs</div>
<h2 title="Interface Preferences" class="title">Interface Preferences</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="typeNameLabel">Preferences</span></pre>
<div class="block">A node in a hierarchical collection of preference data.
<p>
This interface allows applications to store and retrieve user and system
preference data. This data is stored persistently in an
implementation-dependent backing store. Typical implementations include flat
files, OS-specific registries, directory servers and SQL databases.
<p>
For each bundle, there is a separate tree of nodes for each user, and one for
system preferences. The precise description of "user" and "system" will vary
from one bundle to another. Typical information stored in the user preference
tree might include font choice, and color choice for a bundle which interacts
with the user via a servlet. Typical information stored in the system
preference tree might include installation data, or things like high score
information for a game program.
<p>
Nodes in a preference tree are named in a similar fashion to directories in a
hierarchical file system. Every node in a preference tree has a <i>node name
</i> (which is not necessarily unique), a unique <i>absolute path name </i>,
and a path name <i>relative </i> to each ancestor including itself.
<p>
The root node has a node name of the empty <code>String</code> object (""). Every
other node has an arbitrary node name, specified at the time it is created.
The only restrictions on this name are that it cannot be the empty string,
and it cannot contain the slash character ('/').
<p>
The root node has an absolute path name of <code>"/"</code>. Children of the root
node have absolute path names of <code>"/" + </code> <i><node name> </i>.
All other nodes have absolute path names of <i><parent's absolute path
name> </i> <code>+ "/" + </code> <i><node name> </i>. Note that all
absolute path names begin with the slash character.
<p>
A node <i>n </i>'s path name relative to its ancestor <i>a </i> is simply the
string that must be appended to <i>a </i>'s absolute path name in order to
form <i>n </i>'s absolute path name, with the initial slash character (if
present) removed. Note that:
<ul>
<li>No relative path names begin with the slash character.</li>
<li>Every node's path name relative to itself is the empty string.</li>
<li>Every node's path name relative to its parent is its node name (except
for the root node, which does not have a parent).</li>
<li>Every node's path name relative to the root is its absolute path name
with the initial slash character removed.</li>
</ul>
<p>
Note finally that:
<ul>
<li>No path name contains multiple consecutive slash characters.</li>
<li>No path name with the exception of the root's absolute path name end in
the slash character.</li>
<li>Any string that conforms to these two rules is a valid path name.</li>
</ul>
<p>
Each <code>Preference</code> node has zero or more properties associated with it,
where a property consists of a name and a value. The bundle writer is free to
choose any appropriate names for properties. Their values can be of type
<code>String</code>,<code>long</code>,<code>int</code>,<code>boolean</code>, <code>byte[]</code>,
<code>float</code>, or <code>double</code> but they can always be accessed as if they
were <code>String</code> objects.
<p>
All node name and property name comparisons are case-sensitive.
<p>
All of the methods that modify preference data are permitted to operate
asynchronously; they may return immediately, and changes will eventually
propagate to the persistent backing store, with an implementation-dependent
delay. The <code>flush</code> method may be used to synchronously force updates to
the backing store.
<p>
Implementations must automatically attempt to flush to the backing store any
pending updates for a bundle's preferences when the bundle is stopped or
otherwise ungets the Preferences Service.
<p>
The methods in this class may be invoked concurrently by multiple threads in
a single Java Virtual Machine (JVM) without the need for external
synchronization, and the results will be equivalent to some serial execution.
If this class is used concurrently <i>by multiple JVMs </i> that store their
preference data in the same backing store, the data store will not be
corrupted, but no other guarantees are made concerning the consistency of the
preference data.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#absolutePath--">absolutePath</a></span>()</code>
<div class="block">Returns this node's absolute path name.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.lang.String[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#childrenNames--">childrenNames</a></span>()</code>
<div class="block">Returns the names of the children of this node.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#clear--">clear</a></span>()</code>
<div class="block">Removes all of the properties (key-value associations) in this node.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#flush--">flush</a></span>()</code>
<div class="block">Forces any changes in the contents of this node and its descendants to
the persistent store.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#get-java.lang.String-java.lang.String-">get</a></span>(java.lang.String key,
java.lang.String def)</code>
<div class="block">Returns the value associated with the specified <code>key</code> in this node.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#getBoolean-java.lang.String-boolean-">getBoolean</a></span>(java.lang.String key,
boolean def)</code>
<div class="block">Returns the <code>boolean</code> value represented by the <code>String</code>
object associated with the specified <code>key</code> in this node.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#getByteArray-java.lang.String-byte:A-">getByteArray</a></span>(java.lang.String key,
byte[] def)</code>
<div class="block">Returns the <code>byte[]</code> value represented by the <code>String</code> object
associated with the specified <code>key</code> in this node.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#getDouble-java.lang.String-double-">getDouble</a></span>(java.lang.String key,
double def)</code>
<div class="block">Returns the <code>double</code> value represented by the <code>String</code> object
associated with the specified <code>key</code> in this node.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#getFloat-java.lang.String-float-">getFloat</a></span>(java.lang.String key,
float def)</code>
<div class="block">Returns the float <code>value</code> represented by the <code>String</code> object
associated with the specified <code>key</code> in this node.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#getInt-java.lang.String-int-">getInt</a></span>(java.lang.String key,
int def)</code>
<div class="block">Returns the <code>int</code> value represented by the <code>String</code> object
associated with the specified <code>key</code> in this node.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#getLong-java.lang.String-long-">getLong</a></span>(java.lang.String key,
long def)</code>
<div class="block">Returns the <code>long</code> value represented by the <code>String</code> object
associated with the specified <code>key</code> in this node.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>java.lang.String[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#keys--">keys</a></span>()</code>
<div class="block">Returns all of the keys that have an associated value in this node.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#name--">name</a></span>()</code>
<div class="block">Returns this node's name, relative to its parent.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/osgi/service/prefs/Preferences.html" title="interface in org.osgi.service.prefs">Preferences</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#node-java.lang.String-">node</a></span>(java.lang.String pathName)</code>
<div class="block">Returns a named <code>Preferences</code> object (node), creating it and any of
its ancestors if they do not already exist.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#nodeExists-java.lang.String-">nodeExists</a></span>(java.lang.String pathName)</code>
<div class="block">Returns true if the named node exists.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/osgi/service/prefs/Preferences.html" title="interface in org.osgi.service.prefs">Preferences</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#parent--">parent</a></span>()</code>
<div class="block">Returns the parent of this node, or <code>null</code> if this is the root.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#put-java.lang.String-java.lang.String-">put</a></span>(java.lang.String key,
java.lang.String value)</code>
<div class="block">Associates the specified value with the specified key in this node.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#putBoolean-java.lang.String-boolean-">putBoolean</a></span>(java.lang.String key,
boolean value)</code>
<div class="block">Associates a <code>String</code> object representing the specified
<code>boolean</code> value with the specified key in this node.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#putByteArray-java.lang.String-byte:A-">putByteArray</a></span>(java.lang.String key,
byte[] value)</code>
<div class="block">Associates a <code>String</code> object representing the specified
<code>byte[]</code> with the specified <code>key</code> in this node.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#putDouble-java.lang.String-double-">putDouble</a></span>(java.lang.String key,
double value)</code>
<div class="block">Associates a <code>String</code> object representing the specified
<code>double</code> value with the specified <code>key</code> in this node.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#putFloat-java.lang.String-float-">putFloat</a></span>(java.lang.String key,
float value)</code>
<div class="block">Associates a <code>String</code> object representing the specified
<code>float</code> value with the specified <code>key</code> in this node.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#putInt-java.lang.String-int-">putInt</a></span>(java.lang.String key,
int value)</code>
<div class="block">Associates a <code>String</code> object representing the specified <code>int</code>
value with the specified <code>key</code> in this node.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#putLong-java.lang.String-long-">putLong</a></span>(java.lang.String key,
long value)</code>
<div class="block">Associates a <code>String</code> object representing the specified
<code>long</code> value with the specified <code>key</code> in this node.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#remove-java.lang.String-">remove</a></span>(java.lang.String key)</code>
<div class="block">Removes the value associated with the specified <code>key</code> in this node,
if any.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--">removeNode</a></span>()</code>
<div class="block">Removes this node and all of its descendants, invalidating any properties
contained in the removed nodes.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/osgi/service/prefs/Preferences.html#sync--">sync</a></span>()</code>
<div class="block">Ensures that future reads from this node and its descendants reflect any
changes that were committed to the persistent store (from any VM) prior
to the <code>sync</code> invocation.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="put-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre>void put(java.lang.String key,
java.lang.String value)</pre>
<div class="block">Associates the specified value with the specified key in this node.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - key with which the specified value is to be associated.</dd>
<dd><code>value</code> - value to be associated with the specified key.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> or <code>value</code> is
<code>null</code>.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
</dl>
</li>
</ul>
<a name="get-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get</h4>
<pre>java.lang.String get(java.lang.String key,
java.lang.String def)</pre>
<div class="block">Returns the value associated with the specified <code>key</code> in this node.
Returns the specified default if there is no value associated with the
<code>key</code>, or the backing store is inaccessible.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - key whose associated value is to be returned.</dd>
<dd><code>def</code> - the value to be returned in the event that this node has no
value associated with <code>key</code> or the backing store is
inaccessible.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value associated with <code>key</code>, or <code>def</code> if no value
is associated with <code>key</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> is <code>null</code>. (A
<code>null</code> default <i>is </i> permitted.)</dd>
</dl>
</li>
</ul>
<a name="remove-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre>void remove(java.lang.String key)</pre>
<div class="block">Removes the value associated with the specified <code>key</code> in this node,
if any.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - key whose mapping is to be removed from this node.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#get-java.lang.String-java.lang.String-"><code>get(String,String)</code></a></dd>
</dl>
</li>
</ul>
<a name="clear--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>void clear()
throws <a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs">BackingStoreException</a></pre>
<div class="block">Removes all of the properties (key-value associations) in this node. This
call has no effect on any descendants of this node.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs">BackingStoreException</a></code> - if this operation cannot be completed due
to a failure in the backing store, or inability to communicate
with it.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#remove-java.lang.String-"><code>remove(String)</code></a></dd>
</dl>
</li>
</ul>
<a name="putInt-java.lang.String-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putInt</h4>
<pre>void putInt(java.lang.String key,
int value)</pre>
<div class="block">Associates a <code>String</code> object representing the specified <code>int</code>
value with the specified <code>key</code> in this node. The associated string
is the one that would be returned if the <code>int</code> value were passed to
<code>Integer.toString(int)</code>. This method is intended for use in
conjunction with <a href="../../../../org/osgi/service/prefs/Preferences.html#getInt-java.lang.String-int-"><code>getInt(String, int)</code></a> method.
<p>
Implementor's note: it is <i>not </i> necessary that the property value
be represented by a <code>String</code> object in the backing store. If the
backing store supports integer values, it is not unreasonable to use
them. This implementation detail is not visible through the
<code>Preferences</code> API, which allows the value to be read as an
<code>int</code> (with <code>getInt</code> or a <code>String</code> (with <code>get</code>)
type.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - key with which the string form of value is to be associated.</dd>
<dd><code>value</code> - <code>value</code> whose string form is to be associated with
<code>key</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> is <code>null</code>.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#getInt-java.lang.String-int-"><code>getInt(String,int)</code></a></dd>
</dl>
</li>
</ul>
<a name="getInt-java.lang.String-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInt</h4>
<pre>int getInt(java.lang.String key,
int def)</pre>
<div class="block">Returns the <code>int</code> value represented by the <code>String</code> object
associated with the specified <code>key</code> in this node. The
<code>String</code> object is converted to an <code>int</code> as by
<code>Integer.parseInt(String)</code>. Returns the specified default if there
is no value associated with the <code>key</code>, the backing store is
inaccessible, or if <code>Integer.parseInt(String)</code> would throw a
<code>NumberFormatException</code> if the associated <code>value</code> were
passed. This method is intended for use in conjunction with the
<a href="../../../../org/osgi/service/prefs/Preferences.html#putInt-java.lang.String-int-"><code>putInt(String, int)</code></a> method.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - key whose associated value is to be returned as an <code>int</code>
.</dd>
<dd><code>def</code> - the value to be returned in the event that this node has no
value associated with <code>key</code> or the associated value cannot
be interpreted as an <code>int</code> or the backing store is
inaccessible.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>int</code> value represented by the <code>String</code> object
associated with <code>key</code> in this node, or <code>def</code> if the
associated value does not exist or cannot be interpreted as an
<code>int</code> type.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> is <code>null</code>.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#putInt-java.lang.String-int-"><code>putInt(String,int)</code></a>,
<a href="../../../../org/osgi/service/prefs/Preferences.html#get-java.lang.String-java.lang.String-"><code>get(String,String)</code></a></dd>
</dl>
</li>
</ul>
<a name="putLong-java.lang.String-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putLong</h4>
<pre>void putLong(java.lang.String key,
long value)</pre>
<div class="block">Associates a <code>String</code> object representing the specified
<code>long</code> value with the specified <code>key</code> in this node. The
associated <code>String</code> object is the one that would be returned if the
<code>long</code> value were passed to <code>Long.toString(long)</code>. This
method is intended for use in conjunction with the
<a href="../../../../org/osgi/service/prefs/Preferences.html#getLong-java.lang.String-long-"><code>getLong(String, long)</code></a> method.
<p>
Implementor's note: it is <i>not </i> necessary that the <code>value</code> be
represented by a <code>String</code> type in the backing store. If the backing
store supports <code>long</code> values, it is not unreasonable to use them.
This implementation detail is not visible through the <code>Preferences</code>
API, which allows the value to be read as a <code>long</code> (with
<code>getLong</code> or a <code>String</code> (with <code>get</code>) type.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - <code>key</code> with which the string form of <code>value</code> is to
be associated.</dd>
<dd><code>value</code> - <code>value</code> whose string form is to be associated with
<code>key</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> is <code>null</code>.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#getLong-java.lang.String-long-"><code>getLong(String,long)</code></a></dd>
</dl>
</li>
</ul>
<a name="getLong-java.lang.String-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLong</h4>
<pre>long getLong(java.lang.String key,
long def)</pre>
<div class="block">Returns the <code>long</code> value represented by the <code>String</code> object
associated with the specified <code>key</code> in this node. The
<code>String</code> object is converted to a <code>long</code> as by
<code>Long.parseLong(String)</code>. Returns the specified default if there is
no value associated with the <code>key</code>, the backing store is
inaccessible, or if <code>Long.parseLong(String)</code> would throw a
<code>NumberFormatException</code> if the associated <code>value</code> were
passed. This method is intended for use in conjunction with the
<a href="../../../../org/osgi/service/prefs/Preferences.html#putLong-java.lang.String-long-"><code>putLong(String, long)</code></a> method.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - <code>key</code> whose associated value is to be returned as a
<code>long</code> value.</dd>
<dd><code>def</code> - the value to be returned in the event that this node has no
value associated with <code>key</code> or the associated value cannot
be interpreted as a <code>long</code> type or the backing store is
inaccessible.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>long</code> value represented by the <code>String</code> object
associated with <code>key</code> in this node, or <code>def</code> if the
associated value does not exist or cannot be interpreted as a
<code>long</code> type.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> is <code>null</code>.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#putLong-java.lang.String-long-"><code>putLong(String,long)</code></a>,
<a href="../../../../org/osgi/service/prefs/Preferences.html#get-java.lang.String-java.lang.String-"><code>get(String,String)</code></a></dd>
</dl>
</li>
</ul>
<a name="putBoolean-java.lang.String-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putBoolean</h4>
<pre>void putBoolean(java.lang.String key,
boolean value)</pre>
<div class="block">Associates a <code>String</code> object representing the specified
<code>boolean</code> value with the specified key in this node. The associated
string is "true" if the value is <code>true</code>, and "false" if it is
<code>false</code>. This method is intended for use in conjunction with the
<a href="../../../../org/osgi/service/prefs/Preferences.html#getBoolean-java.lang.String-boolean-"><code>getBoolean(String, boolean)</code></a> method.
<p>
Implementor's note: it is <i>not </i> necessary that the value be
represented by a string in the backing store. If the backing store
supports <code>boolean</code> values, it is not unreasonable to use them. This
implementation detail is not visible through the <code>Preferences
</code> API, which
allows the value to be read as a <code>boolean</code> (with <code>getBoolean</code>
) or a <code>String</code> (with <code>get</code>) type.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - <code>key</code> with which the string form of value is to be
associated.</dd>
<dd><code>value</code> - value whose string form is to be associated with <code>key</code>
.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> is <code>null</code>.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#getBoolean-java.lang.String-boolean-"><code>getBoolean(String,boolean)</code></a>,
<a href="../../../../org/osgi/service/prefs/Preferences.html#get-java.lang.String-java.lang.String-"><code>get(String,String)</code></a></dd>
</dl>
</li>
</ul>
<a name="getBoolean-java.lang.String-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBoolean</h4>
<pre>boolean getBoolean(java.lang.String key,
boolean def)</pre>
<div class="block">Returns the <code>boolean</code> value represented by the <code>String</code>
object associated with the specified <code>key</code> in this node. Valid
strings are "true", which represents <code>true</code>, and "false", which
represents <code>false</code>. Case is ignored, so, for example, "TRUE" and
"False" are also valid. This method is intended for use in conjunction
with the <a href="../../../../org/osgi/service/prefs/Preferences.html#putBoolean-java.lang.String-boolean-"><code>putBoolean(String, boolean)</code></a> method.
<p>
Returns the specified default if there is no value associated with the
<code>key</code>, the backing store is inaccessible, or if the associated
value is something other than "true" or "false", ignoring case.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - <code>key</code> whose associated value is to be returned as a
<code>boolean</code>.</dd>
<dd><code>def</code> - the value to be returned in the event that this node has no
value associated with <code>key</code> or the associated value cannot
be interpreted as a <code>boolean</code> or the backing store is
inaccessible.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>boolean</code> value represented by the <code>String</code>
object associated with <code>key</code> in this node, or <code>null</code>
if the associated value does not exist or cannot be interpreted
as a <code>boolean</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> is <code>null</code>.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#get-java.lang.String-java.lang.String-"><code>get(String,String)</code></a>,
<a href="../../../../org/osgi/service/prefs/Preferences.html#putBoolean-java.lang.String-boolean-"><code>putBoolean(String,boolean)</code></a></dd>
</dl>
</li>
</ul>
<a name="putFloat-java.lang.String-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putFloat</h4>
<pre>void putFloat(java.lang.String key,
float value)</pre>
<div class="block">Associates a <code>String</code> object representing the specified
<code>float</code> value with the specified <code>key</code> in this node. The
associated <code>String</code> object is the one that would be returned if the
<code>float</code> value were passed to <code>Float.toString(float)</code>. This
method is intended for use in conjunction with the
<a href="../../../../org/osgi/service/prefs/Preferences.html#getFloat-java.lang.String-float-"><code>getFloat(String, float)</code></a> method.
<p>
Implementor's note: it is <i>not </i> necessary that the value be
represented by a string in the backing store. If the backing store
supports <code>float</code> values, it is not unreasonable to use them. This
implementation detail is not visible through the <code>Preferences
</code> API, which
allows the value to be read as a <code>float</code> (with <code>getFloat</code>) or
a <code>String</code> (with <code>get</code>) type.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - <code>key</code> with which the string form of value is to be
associated.</dd>
<dd><code>value</code> - value whose string form is to be associated with <code>key</code>
.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> is <code>null</code>.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#getFloat-java.lang.String-float-"><code>getFloat(String,float)</code></a></dd>
</dl>
</li>
</ul>
<a name="getFloat-java.lang.String-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFloat</h4>
<pre>float getFloat(java.lang.String key,
float def)</pre>
<div class="block">Returns the float <code>value</code> represented by the <code>String</code> object
associated with the specified <code>key</code> in this node. The
<code>String</code> object is converted to a <code>float</code> value as by
<code>Float.parseFloat(String)</code>. Returns the specified default if there
is no value associated with the <code>key</code>, the backing store is
inaccessible, or if <code>Float.parseFloat(String)</code> would throw a
<code>NumberFormatException</code> if the associated value were passed. This
method is intended for use in conjunction with the
<a href="../../../../org/osgi/service/prefs/Preferences.html#putFloat-java.lang.String-float-"><code>putFloat(String, float)</code></a> method.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - <code>key</code> whose associated value is to be returned as a
<code>float</code> value.</dd>
<dd><code>def</code> - the value to be returned in the event that this node has no
value associated with <code>key</code> or the associated value cannot
be interpreted as a <code>float</code> type or the backing store is
inaccessible.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>float</code> value represented by the string associated with
<code>key</code> in this node, or <code>def</code> if the associated value
does not exist or cannot be interpreted as a <code>float</code> type.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> is <code>null</code>.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#putFloat-java.lang.String-float-"><code>putFloat(String,float)</code></a>,
<a href="../../../../org/osgi/service/prefs/Preferences.html#get-java.lang.String-java.lang.String-"><code>get(String,String)</code></a></dd>
</dl>
</li>
</ul>
<a name="putDouble-java.lang.String-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putDouble</h4>
<pre>void putDouble(java.lang.String key,
double value)</pre>
<div class="block">Associates a <code>String</code> object representing the specified
<code>double</code> value with the specified <code>key</code> in this node. The
associated <code>String</code> object is the one that would be returned if the
<code>double</code> value were passed to <code>Double.toString(double)</code>. This
method is intended for use in conjunction with the
<a href="../../../../org/osgi/service/prefs/Preferences.html#getDouble-java.lang.String-double-"><code>getDouble(String, double)</code></a> method
<p>
Implementor's note: it is <i>not </i> necessary that the value be
represented by a string in the backing store. If the backing store
supports <code>double</code> values, it is not unreasonable to use them. This
implementation detail is not visible through the <code>Preferences
</code> API, which
allows the value to be read as a <code>double</code> (with <code>getDouble</code>)
or a <code>String</code> (with <code>get</code>) type.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - <code>key</code> with which the string form of value is to be
associated.</dd>
<dd><code>value</code> - value whose string form is to be associated with <code>key</code>
.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> is <code>null</code>.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#getDouble-java.lang.String-double-"><code>getDouble(String,double)</code></a></dd>
</dl>
</li>
</ul>
<a name="getDouble-java.lang.String-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDouble</h4>
<pre>double getDouble(java.lang.String key,
double def)</pre>
<div class="block">Returns the <code>double</code> value represented by the <code>String</code> object
associated with the specified <code>key</code> in this node. The
<code>String</code> object is converted to a <code>double</code> value as by
<code>Double.parseDouble(String)</code>. Returns the specified default if
there is no value associated with the <code>key</code>, the backing store is
inaccessible, or if <code>Double.parseDouble(String)</code> would throw a
<code>NumberFormatException</code> if the associated value were passed. This
method is intended for use in conjunction with the <a href="../../../../org/osgi/service/prefs/Preferences.html#putDouble-java.lang.String-double-"><code>putDouble(java.lang.String, double)</code></a>
method.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - <code>key</code> whose associated value is to be returned as a
<code>double</code> value.</dd>
<dd><code>def</code> - the value to be returned in the event that this node has no
value associated with <code>key</code> or the associated value cannot
be interpreted as a <code>double</code> type or the backing store is
inaccessible.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>double</code> value represented by the <code>String</code> object
associated with <code>key</code> in this node, or <code>def</code> if the
associated value does not exist or cannot be interpreted as a
<code>double</code> type.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> is <code>null</code>.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#putDouble-java.lang.String-double-"><code>putDouble(String,double)</code></a>,
<a href="../../../../org/osgi/service/prefs/Preferences.html#get-java.lang.String-java.lang.String-"><code>get(String,String)</code></a></dd>
</dl>
</li>
</ul>
<a name="putByteArray-java.lang.String-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putByteArray</h4>
<pre>void putByteArray(java.lang.String key,
byte[] value)</pre>
<div class="block">Associates a <code>String</code> object representing the specified
<code>byte[]</code> with the specified <code>key</code> in this node. The
associated <code>String</code> object the <i>Base64 </i> encoding of the
<code>byte[]</code>, as defined in <a
href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045 </a>, Section 6.8,
with one minor change: the string will consist solely of characters from
the <i>Base64 Alphabet </i>; it will not contain any newline characters.
This method is intended for use in conjunction with the
<a href="../../../../org/osgi/service/prefs/Preferences.html#getByteArray-java.lang.String-byte:A-"><code>getByteArray(String, byte[])</code></a> method.
<p>
Implementor's note: it is <i>not </i> necessary that the value be
represented by a <code>String</code> type in the backing store. If the backing
store supports <code>byte[]</code> values, it is not unreasonable to use them.
This implementation detail is not visible through the <code>Preferences</code>
API, which allows the value to be read as an a <code>byte[]</code> object
(with <code>getByteArray</code>) or a <code>String</code> object (with <code>get</code>
).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - <code>key</code> with which the string form of <code>value</code> is to
be associated.</dd>
<dd><code>value</code> - <code>value</code> whose string form is to be associated with
<code>key</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> or <code>value</code> is
<code>null</code>.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#getByteArray-java.lang.String-byte:A-"><code>getByteArray(String,byte[])</code></a>,
<a href="../../../../org/osgi/service/prefs/Preferences.html#get-java.lang.String-java.lang.String-"><code>get(String,String)</code></a></dd>
</dl>
</li>
</ul>
<a name="getByteArray-java.lang.String-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getByteArray</h4>
<pre>byte[] getByteArray(java.lang.String key,
byte[] def)</pre>
<div class="block">Returns the <code>byte[]</code> value represented by the <code>String</code> object
associated with the specified <code>key</code> in this node. Valid
<code>String</code> objects are <i>Base64 </i> encoded binary data, as defined
in <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045 </a>, Section
6.8, with one minor change: the string must consist solely of characters
from the <i>Base64 Alphabet </i>; no newline characters or extraneous
characters are permitted. This method is intended for use in conjunction
with the <a href="../../../../org/osgi/service/prefs/Preferences.html#putByteArray-java.lang.String-byte:A-"><code>putByteArray(String, byte[])</code></a> method.
<p>
Returns the specified default if there is no value associated with the
<code>key</code>, the backing store is inaccessible, or if the associated
value is not a valid Base64 encoded byte array (as defined above).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - <code>key</code> whose associated value is to be returned as a
<code>byte[]</code> object.</dd>
<dd><code>def</code> - the value to be returned in the event that this node has no
value associated with <code>key</code> or the associated value cannot
be interpreted as a <code>byte[]</code> type, or the backing store is
inaccessible.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>byte[]</code> value represented by the <code>String</code> object
associated with <code>key</code> in this node, or <code>def</code> if the
associated value does not exist or cannot be interpreted as a
<code>byte[]</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if <code>key</code> is <code>null</code>. (A
<code>null</code> value for <code>def</code> <i>is </i> permitted.)</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#get-java.lang.String-java.lang.String-"><code>get(String,String)</code></a>,
<a href="../../../../org/osgi/service/prefs/Preferences.html#putByteArray-java.lang.String-byte:A-"><code>putByteArray(String,byte[])</code></a></dd>
</dl>
</li>
</ul>
<a name="keys--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>keys</h4>
<pre>java.lang.String[] keys()
throws <a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs">BackingStoreException</a></pre>
<div class="block">Returns all of the keys that have an associated value in this node. (The
returned array will be of size zero if this node has no preferences and
not <code>null</code>!)</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an array of the keys that have an associated value in this node.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs">BackingStoreException</a></code> - if this operation cannot be completed due
to a failure in the backing store, or inability to communicate
with it.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
</dl>
</li>
</ul>
<a name="childrenNames--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>childrenNames</h4>
<pre>java.lang.String[] childrenNames()
throws <a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs">BackingStoreException</a></pre>
<div class="block">Returns the names of the children of this node. (The returned array will
be of size zero if this node has no children and not <code>null</code>!)</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the names of the children of this node.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs">BackingStoreException</a></code> - if this operation cannot be completed due
to a failure in the backing store, or inability to communicate
with it.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
</dl>
</li>
</ul>
<a name="parent--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parent</h4>
<pre><a href="../../../../org/osgi/service/prefs/Preferences.html" title="interface in org.osgi.service.prefs">Preferences</a> parent()</pre>
<div class="block">Returns the parent of this node, or <code>null</code> if this is the root.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the parent of this node.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
</dl>
</li>
</ul>
<a name="node-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>node</h4>
<pre><a href="../../../../org/osgi/service/prefs/Preferences.html" title="interface in org.osgi.service.prefs">Preferences</a> node(java.lang.String pathName)</pre>
<div class="block">Returns a named <code>Preferences</code> object (node), creating it and any of
its ancestors if they do not already exist. Accepts a relative or
absolute pathname. Absolute pathnames (which begin with <code>'/'</code>) are
interpreted relative to the root of this node. Relative pathnames (which
begin with any character other than <code>'/'</code>) are interpreted relative
to this node itself. The empty string (<code>""</code>) is a valid relative
pathname, referring to this node itself.
<p>
If the returned node did not exist prior to this call, this node and any
ancestors that were created by this call are not guaranteed to become
persistent until the <code>flush</code> method is called on the returned node
(or one of its descendants).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pathName</code> - the path name of the <code>Preferences</code> object to
return.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the specified <code>Preferences</code> object.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the path name is invalid.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dd><code>java.lang.NullPointerException</code> - if path name is <code>null</code>.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#flush--"><code>flush()</code></a></dd>
</dl>
</li>
</ul>
<a name="nodeExists-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nodeExists</h4>
<pre>boolean nodeExists(java.lang.String pathName)
throws <a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs">BackingStoreException</a></pre>
<div class="block">Returns true if the named node exists. Accepts a relative or absolute
pathname. Absolute pathnames (which begin with <code>'/'</code>) are
interpreted relative to the root of this node. Relative pathnames (which
begin with any character other than <code>'/'</code>) are interpreted relative
to this node itself. The pathname <code>""</code> is valid, and refers to this
node itself.
<p>
If this node (or an ancestor) has already been removed with the
<a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method, it <i>is </i> legal to invoke this method,
but only with the pathname <code>""</code>; the invocation will return
<code>false</code>. Thus, the idiom <code>p.nodeExists("")</code> may be used to
test whether <code>p</code> has been removed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pathName</code> - the path name of the node whose existence is to be
checked.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the specified node exists.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs">BackingStoreException</a></code> - if this operation cannot be completed due
to a failure in the backing store, or inability to communicate
with it.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method and
<code>pathname</code> is not the empty string (<code>""</code>).</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if the path name is invalid (i.e., it
contains multiple consecutive slash characters, or ends with a
slash character and is more than one character long).</dd>
</dl>
</li>
</ul>
<a name="removeNode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeNode</h4>
<pre>void removeNode()
throws <a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs">BackingStoreException</a></pre>
<div class="block">Removes this node and all of its descendants, invalidating any properties
contained in the removed nodes. Once a node has been removed, attempting
any method other than <code>name()</code>,<code>absolutePath()</code> or
<code>nodeExists("")</code> on the corresponding <code>Preferences</code> instance
will fail with an <code>IllegalStateException</code>. (The methods defined on
<code>Object</code> can still be invoked on a node after it has been removed;
they will not throw <code>IllegalStateException</code>.)
<p>
The removal is not guaranteed to be persistent until the <code>flush</code>
method is called on the parent of this node.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has already
been removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dd><code><a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs">BackingStoreException</a></code> - if this operation cannot be completed due
to a failure in the backing store, or inability to communicate
with it.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#flush--"><code>flush()</code></a></dd>
</dl>
</li>
</ul>
<a name="name--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>name</h4>
<pre>java.lang.String name()</pre>
<div class="block">Returns this node's name, relative to its parent.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this node's name, relative to its parent.</dd>
</dl>
</li>
</ul>
<a name="absolutePath--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>absolutePath</h4>
<pre>java.lang.String absolutePath()</pre>
<div class="block">Returns this node's absolute path name. Note that:
<ul>
<li>Root node - The path name of the root node is <code>"/"</code>.</li>
<li>Slash at end - Path names other than that of the root node may not
end in slash (<code>'/'</code>).</li>
<li>Unusual names -<code>"."</code> and <code>".."</code> have <i>no</i> special
significance in path names.</li>
<li>Illegal names - The only illegal path names are those that contain
multiple consecutive slashes, or that end in slash and are not the root.</li>
</ul></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this node's absolute path name.</dd>
</dl>
</li>
</ul>
<a name="flush--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flush</h4>
<pre>void flush()
throws <a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs">BackingStoreException</a></pre>
<div class="block">Forces any changes in the contents of this node and its descendants to
the persistent store.
<p>
Once this method returns successfully, it is safe to assume that all
changes made in the subtree rooted at this node prior to the method
invocation have become permanent.
<p>
Implementations are free to flush changes into the persistent store at
any time. They do not need to wait for this method to be called.
<p>
When a flush occurs on a newly created node, it is made persistent, as
are any ancestors (and descendants) that have yet to be made persistent.
Note however that any properties value changes in ancestors are <i>not
</i> guaranteed to be made persistent.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs">BackingStoreException</a></code> - if this operation cannot be completed due
to a failure in the backing store, or inability to communicate
with it.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#sync--"><code>sync()</code></a></dd>
</dl>
</li>
</ul>
<a name="sync--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>sync</h4>
<pre>void sync()
throws <a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs">BackingStoreException</a></pre>
<div class="block">Ensures that future reads from this node and its descendants reflect any
changes that were committed to the persistent store (from any VM) prior
to the <code>sync</code> invocation. As a side-effect, forces any changes in
the contents of this node and its descendants to the persistent store, as
if the <code>flush</code> method had been invoked on this node.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs">BackingStoreException</a></code> - if this operation cannot be completed due
to a failure in the backing store, or inability to communicate
with it.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this node (or an ancestor) has been
removed with the <a href="../../../../org/osgi/service/prefs/Preferences.html#removeNode--"><code>removeNode()</code></a> method.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/osgi/service/prefs/Preferences.html#flush--"><code>flush()</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/osgi/service/prefs/BackingStoreException.html" title="class in org.osgi.service.prefs"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../org/osgi/service/prefs/PreferencesService.html" title="interface in org.osgi.service.prefs"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/osgi/service/prefs/Preferences.html" target="_top">Frames</a></li>
<li><a href="Preferences.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
|