I want to split below string
G04:AMPARAMS|DCode=50|XSize=66mil|YSize=66mil|CornerRadius=0mil|HoleSize=0mil|Usage=FLASHONLY|Rotation=0.000|XOffset=0mil|YOffset=0mil|HoleType=Round|Shape=Octagon|*
I was first spliting the code from '|' pipe sign then spliting again from '=' equal sign but problem i am facing here is that how to store the value in hashmap as they are in a loop so i can't store it in a hashmap. Any Possible solution would be appricated.
String[] temp=line.split("\\|");
for(String p:temp){
HashMap<String,String>attributes=new HashMap<String,String>();
String[] key =p.split("\\=");
for(String tmp:key){
//System.out.println(tmp);
attributes.put();
}