Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - '\0' in byte[] to String

'\0' in byte[] to String

Put your problem here if it does not fit any of the other categories.

'\0' in byte[] to String

Postby sjtcool » Wed Jan 02, 2008 2:35 am

Hi all, happy new year, ^_^.

When I read byte[] from socket, I used a size-fixed byte[], init with 0. After socket reading, the byte[] filled with a srting that sever had written, then i create a String with constructor String(byte[]), and the problem hapend,
the cunstructor will not change 0 to 0, I mean, the string end '\0' disapeard. It will change 0('\0') to a NOT null value.
Any solution?
Best regards,
sjt.
----------------------------------
good good study,day day up
sjtcool
Junior Developer
Junior Developer
 
Posts: 11
Joined: Wed Dec 19, 2007 3:18 am
Location: Nanjing

Top

Postby plusminus » Thu Jan 03, 2008 12:52 pm

Hello sjtcool,

could you give us an explicit example :?:
Note: Strings in Java are Objects and therefore do not need (are not) end-marked with a NullByte ( '\0' ).

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 7 guests