Results 1 to 2 of 2
- 10-08-2009, 04:23 PM #1
Member
- Join Date
- Oct 2009
- Posts
- 1
- Rep Power
- 0
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
Similar Threads
-
[SOLVED] read last line
By Azndaddy in forum New To JavaReplies: 22Last Post: 04-22-2012, 09:22 PM -
Need to read an .ini and .abook file line by line (both files contain texts)
By ollyworks in forum Java AppletsReplies: 4Last Post: 09-10-2009, 10:18 AM -
How to make Scanner read the same line
By mcollins in forum New To JavaReplies: 2Last Post: 03-03-2009, 06:41 AM -
How to use LineMetrics class to layout characters along a line
By Java Tip in forum java.awtReplies: 0Last Post: 06-25-2008, 10:35 AM -
read the file from different line number
By vaskarbasak in forum Advanced JavaReplies: 3Last Post: 06-02-2008, 01:31 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks