Re: Need Desperate Help...Java Sockets

From: Chris Lamprecht (clamprecht10_at_hotmail.com)
Date: 03/08/04


Date: Sun, 7 Mar 2004 18:32:57 -0600

You can't use BufferedReader with binary (i.e. jpeg) data. You can use a
BufferedInputStream instead.

"JatP" <vicky235ca@yahoo.com> wrote in message
news:8e875047.0403071616.28ca75ea@posting.google.com...
> hi Everyone
> I am trying to create a server and client to send files from one side
> to the other. I can send files from one side to the other using
> bufferedinput/output streams but when trying to send normal messages
> with printwriter my files being sent across are messed up. Empty jpg's
> are being sent with wrong file sizes. My code as follows:



Relevant Pages

  • Streams
    ... Can i use the following constructions in a server and client without being ... BufferedReader in = new BufferedReader( ... PrintWriter pout = new PrintWriter ...
    (comp.lang.java.help)
  • Newbie server response question
    ... I am trying to build a very simple server. ... I am having trouble with the listening part. ... the following code listening for the command (the string variable ... BufferedReader in = new BufferedReader( ...
    (comp.lang.java.programmer)
  • SSL communication losing content data
    ... I am having trouble with a program that transfers data over an SSL ... sent from the client to the server, but when it get to the server the ... both client and server are actually running as servlets on two ... BufferedReader br = new BufferedReader (new InputStreamReader ...
    (comp.lang.java.help)
  • Re: reading bytes with BufferedReader?
    ... I have a simple client - server application. ... If message is plain text the last line ... I'm reading messages with BufferedReader. ... An example is using a PushbackReader and when you find any bytes, you push it back and open a new InputStream from the pushback stream and read the raw bytes. ...
    (comp.lang.java.programmer)
  • Re: applet hangs while reading from stream
    ... > query to the server, reads from the BufferedReader. ... The code you've posted seems to assume that the same connection will ... other way to detect the end of the server response, i.e. a newline, an ...
    (comp.lang.java)