How to convert a String to a Byte[] ?

String days = "111111"
for(int i=0;i<7;i++)

You have only six '1's in your String, but no semicolon after it.