public class PropertyResourceBundle extends ResourceBundle
Read-only resource bundle parsed from properties text. Supports comments (#, !), escaped separators/spaces, continued lines and four-digit Unicode escapes, including supplementary surrogate pairs. Unknown escapes lose their backslash. Unpaired surrogates are rejected, because Klyn strings contain Unicode scalars, not isolated UTF-16 surrogates. Construction never closes caller-owned readers or streams.
import klyn.i18n
import klyn.io
bundle = PropertyResourceBundle(StringReader("save=Save\n"))
assert bundle.getString("save") == "Save"| Modifier and Type | Member | Description |
|---|---|---|
| public | PropertyResourceBundlePropertyResourceBundle(notnull reader as TextReader) |
Parses a caller-owned text reader, preserving its encoding decision. |
| public | PropertyResourceBundlePropertyResourceBundle(notnull stream as InputStream) |
Reads a caller-owned byte stream as UTF-8, falling back to ISO-8859-1 only if the byte sequence is not valid UTF-8. |