As it seems the delimiter should be =
, not space.
Hence - keyValuePair.split("=")
should do.
If you are loading this from a java .properties
file, then you can extend java.util.Properties
and override this method
public synchronized void load(InputStream inStream) throws IOException
so that it parses the properties correctly.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…