• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1290
  • Last Modified:

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
0
dennisk1718
Asked:
dennisk1718
  • 2
1 Solution
 
imladrisCommented:
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

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now