![]() Key is skipped if the first non-white space character after Terminator characters can be included using \r and Included in the key by escaping them with a preceding backslash All of these key termination characters may be ':', or white space character other than a line With the first non-white space character and up to, but not The key contains all of the characters in the line starting Non-zero even number of 2 n contiguous backslashesīefore a line terminator (or elsewhere) encodes n Since the input is processed from left to right, a Terminator is escaped there must be an odd number ofĬontiguous backslashes for the line terminator to be escaped. Preceding a line terminator sequence to decide if the line It is not sufficient to only examine the character Line continuation characters have been removed. The key and element appear on a single natural line after (when loading) will assume all the characters constituting The remainder of the discussion of key and element parsing Terminator sequence, and any white space at the start of theįollowing line have no affect on the key or element values. If a logical line is spread across several natural lines, theīackslash escaping the line terminator sequence, the line Terminators, this format considers the characters space Space character comment lines are also ignored and do notĮncode key-element information. Input until the end of the stream is reached.Ī natural line that contains only white space characters isĬonsidered blank and is ignored. Its own comment indicator, as described below. In this manner every natural line that is a comment must have Note that a comment line cannot be extended The line terminator sequence with a backslash character Out across several adjacent natural lines by escaping Line holds all the data of a key-element pair, which may be spread A natural line may be either a blank line,Ī comment line, or hold all or some of a key-element pair. Kinds of line, natural lines and logical lines.Ĭharacters that is terminated either by a set of line terminator Properties are processed in terms of lines. Reads a property list (key and element pairs) from the inputĬharacter stream in a simple line-oriented format. API Note: The Properties class does not inherit the concept of a load factorįrom its superclass, Hashtable. ![]() Properties object without the need for external synchronization. This class is thread-safe: multiple threads can share a single Serves as a string to uniquely identify the DTD, which is: Not accessed when exporting or importing properties it merely ImplementationsĪre required to support UTF-8 and UTF-16 and may support other encodings.Īn XML properties document has the following DOCTYPE declaration: However a specific encoding may be specified if required. By default the UTF-8 character encoding is used, The loadFromXML(InputStream) and storeToXML(OutputStream, String, String) methods load and store properties Only a single 'u' character is allowed in an escape Unicode escapes as defined in section 3.3 of The input/output stream is encoded in ISO 8859-1 character encoding.Ĭharacters that cannot be directly represented in this encoding can be written using Methods work the same way as the load(Reader)/store(Writer, String) pair, except The load(InputStream) / store(OutputStream, String) In a simple line-oriented format specified below. Methods load and store properties from and to a character based stream ![]() Modifications subsequent to construction. These iterators are guaranteed to traverse elements as they existed uponĬonstruction exactly once, and may (but are not guaranteed to) reflect any ![]() Values()) may not fail-fast (unlike the Hashtable implementation). "collection views" (that is, entrySet(), keySet(), and The iterators returned by the iterator method of this class's Will fail if it is called on a "compromised" Properties The call to the propertyNames or list method Non- String key or value, the call will fail. On a "compromised" Properties object that contains a Their use is strongly discouraged as theyĪllow the caller to insert entries whose keys or values are not Put and putAll methods can be applied to a The property key is not found in the original property list.īecause Properties inherits from Hashtable, the "defaults" this second property list is searched if Each key and its corresponding value inĪ property list can contain another property list as its The Properties class represents a persistent set of
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |