Package io.milton.zsync
Class Upload.KeyValue
java.lang.Object
io.milton.zsync.Upload.KeyValue
- Enclosing class:
- Upload
An object representing a (Key, Value) pair of Strings. Currently unused.
- Author:
- Nick
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Upload.KeyValueParses a String of the form "foo: bar" into a KeyValue object whose KEY is the String preceding the first colon and VALUE is the String following the first colon ( leading and trailing whitespaces are removed from KEY and VALUE ).
-
Field Details
-
KEY
-
VALUE
-
-
Constructor Details
-
KeyValue
-
-
Method Details
-
parseKV
Parses a String of the form "foo: bar" into a KeyValue object whose KEY is the String preceding the first colon and VALUE is the String following the first colon ( leading and trailing whitespaces are removed from KEY and VALUE ). A ParseException is thrown if the input String does not contain a colon.- Parameters:
kv- A String of the form "foo: bar"- Returns:
- A KeyValue object with a KEY of "foo" and a VALUE of "bar"
- Throws:
ParseException- If no colon is found in kv
-