Results 1 to 2 of 2
- 10-08-2009, 04:23 PM #1Member
- Join Date
- Oct 2009
- Rep Power
readline() doesnt read whole line, are there another terminating characters ?
i constructed socket communication between java(receiver) and c++(sender) machines. i want to send image as char array c++ to java. by using opencv library, i can read image file on system and convert it to rgb char array. but for some images, taken from cam and converted after bmp, i can't send them. in java side readline() method couldnt read all the line. can be there any terminatying characters in the image file ? or how can i fix this ?
is there another reading method which i can read only i.e first 270000 characters from socket ?
- 10-08-2009, 04:45 PM #2
With readline() it is looking for a '\n' character to determine the end of a line. That works fine for strings and things that can be turned into strings, like numbers and such, but if you send over binary data, that binary data will contain the character '\n' as part of it's normal values.My Hobby Project: LegacyClone
- By Azndaddy in forum New To JavaReplies: 22Last Post: 04-22-2012, 09:22 PM
- By ollyworks in forum Java AppletsReplies: 4Last Post: 09-10-2009, 10:18 AM
- By mcollins in forum New To JavaReplies: 2Last Post: 03-03-2009, 06:41 AM
- By Java Tip in forum java.awtReplies: 0Last Post: 06-25-2008, 10:35 AM
- By vaskarbasak in forum Advanced JavaReplies: 3Last Post: 06-02-2008, 01:31 PM