Class Upload.KeyValue

java.lang.Object
io.milton.zsync.Upload.KeyValue
Enclosing class:
Upload

public static class Upload.KeyValue extends Object
An object representing a (Key, Value) pair of Strings. Currently unused.
Author:
Nick
  • Field Details

    • KEY

      public final String KEY
    • VALUE

      public final String VALUE
  • Constructor Details

  • Method Details

    • parseKV

      public static Upload.KeyValue parseKV(String kv) throws ParseException
      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