On the money! Thanks for the post.
So a very simple and excelent post. Just saying that you have missed in naming the first byte[], first its name is bytearr, and later it's named as bytearray.Thank you
This is bad advice, never use new String(byte[]), it uses the platform default encoding and leads to fragile code that doesn't work on all platforms.
Thanks, it's useful.
This is also bad because it doesn't take into account the current position, the remaining amount comes after the position...
Thanks. Very nice tip, and to refer to Chris Dennett remark, u can use instead: public String(byte[] bytes, int offset, int length, Charset charset)Cheers
Waaw.. thats wat I was looking for.. Thanks a lot! :)
Post a Comment
9 comments:
On the money! Thanks for the post.
So a very simple and excelent post. Just saying that you have missed in naming the first byte[], first its name is bytearr, and later it's named as bytearray.
Thank you
This is bad advice, never use new String(byte[]), it uses the platform default encoding and leads to fragile code that doesn't work on all platforms.
Thanks, it's useful.
This is also bad because it doesn't take into account the current position, the remaining amount comes after the position...
Thanks. Very nice tip, and to refer to Chris Dennett remark, u can use instead: public String(byte[] bytes, int offset, int length, Charset charset)
Cheers
Waaw.. thats wat I was looking for.. Thanks a lot! :)
Waaw.. thats wat I was looking for.. Thanks a lot! :)
Post a Comment