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
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.