Reading file part-by-part at client side and sending it via sockets and printing it part-by-part

前端 未结 2 1803
渐次进展
渐次进展 2020-12-11 12:24

I wanted to send a part of file to server where it will be printed on server screen...however dos reads entire input...kindly suggest what i can do....is there any other way

2条回答
  •  旧巷少年郎
    2020-12-11 13:30

    Use InputStream.skip() to get to where you want to start sending.

    And if you're using an InputStream to read, you should be writing with an OutputStream, not a Reader. Conversely, if you're using a Writer you should be reading with a Reader, but only if you know the data is text.

提交回复
热议问题