well I finally seen what i was doing wrong when posting code my bad sorry
ok for a real question that i can't find a answer in the code line String stringOne = "Content-Type: text/html"; what is Content-Type, represent and is :test/html the string?
i tried this if (stringOne.substring(1,5) == "R") to capture Rxxxx but i got, stringOne was not declared in this scope