java - Append byte array as unicode character(s) to a string and display it and write that string back to a file -
java - Append byte array as unicode character(s) to a string and display it and write that string back to a file -
i have byte array e2 80 94
means long dash "\u2014". want append bytes string see long dash when display it. how do that? after displaying it, howdo write string file long dash stored e2 80 94
?
my bytes vary in length: 1 - 8 bytes. want write them literally string (and string file). have no means know if bytes 1 character or multiple. reading them binary file(.mobi).
"0x01 0x08: "literals": byte interpreted count 1 8, , many literals copied unmodified compressed stream decompressed stream." -wikibooks, palmdoc compression
you can build string with
http://docs.oracle.com/javase/7/docs/api/java/lang/string.html#string%28byte[],%20java.nio.charset.charset%29
and operate it. create sure identify encoding of binary array in order constructor work
java string unicode bytearray
Comments
Post a Comment