For testing, try reading the data at the char level:


int ch;
while((ch = in.read()) != -1) {
System.out.print((char)ch);
}


Please edit...