Java Read file, send out socket without using BufferedReader

Helllo,
I am stumped on how to accomplish the reading of a file with subsequent writes to a socket all without using BufferedReader as I have to avoid the elimination of the CRLFs embedded in the file.

Thank You
dennisk1718Asked:
Who is Participating?
 
imladrisConnect With a Mentor Commented:
If you need to take the file "verbatim", byte by byte, you can simply read it with a FileInputStream. You can use the read method to read a specified number of bytes, which can then be written to the socket.

Or do you need to read the file line by line for some reason?
0
 
imladrisCommented:
Did that help you solve the problem?

If so, it is now time to grade the question and close it.

If not, a clarifying question may help.
0
 
dennisk1718Author Commented:

Thank You
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.