문제

I've been poking around the internet for quite a while now, and I was wondering how I could use BufferedReader and DataInputStream together without opening a different port. I've tried to stream images, but as the buffered reader stores extra bytes, it creates a corrupt image. When I attempt to use DataInputStream.read(), I can't read full lines of text as easily. Is there some sort of solution for my problem?

도움이 되었습니까?

해결책

DataInputStream.readLine(), and yes I know it's deprecated. The real solution is not to use lines in your protocol. Use readUTF() for example.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top