setbyte = sendstring.getBytes("utf-8");
bos = new BufferedOutputStream(socket.getOutputStream(), setbyte.length);
bos.write(setbyte, 0, setbyte.length);
System.out.println("송신 데이터 : "+sendstring+" 길이 : "+setbyte.length);
bis = new BufferedInputStream(socket.getInputStream(), getbyte.length);
bis.read(getbyte,0, getbyte.length);
getValueLength = byteArrayDefrag(getbyte);
getstring = new String(getbyte);
System.out.println("수신된 데이터 : "+getstring+"데이터 길이 : "+getValueLength+1);
Java client 부분 소스 인데요. run 하면 송신된 데이터랑 길이는 나오는데 수신된 데이터와 길이에 대한
System println 자체가 출력이 안됩니다ㅠㅠ
아까는" 수신된 데이터 "가 찍히긴 했는데 getstring 값이 알수 없는 #?@! 뭐 이렇게 나왔습니다
찾아보니 문자 인코딩 때문인거 같은데 이거 도대체 어떻게 해야 하는거죠?ㅠㅠ
꼭 한글 데이터 아니고 영어만 되도 됩니다ㅠㅠ