I'm currently porting a VB project to java and encountered a problem I'm stuck with.
I'm receiving a string which looks like the following:
HOST: xxx.xxx.xxx.xxx
DEFAULT: xxx.xxx.xxx.xxx
OS: LINUX
ID: az150
LIB: eth15
newline at the end of each output, space after ":" I'd like to split those strings and use a switch case afterwards. Not sure if the order stays the same all the time.
the switch case would look something like this:
switch(aString)
{
case "HOST":
String host = HOST Value (xxx.xxx.xxx.xxx);
do something with it
break;
...
default:
break;
}
thanks!