Convert/Represent 1 byte char in 2 bytes

Hello All,

I would like to convert/represent the 1 byte char to 2 byte.

for example the "Test " is a 9 byte string if i use getBytes()

the byte array length is 7 bytes but if i use getBytes("UTF8")

i'm getting 9 bytes but it's not printing " "

Now i want to represent them in a 2 byte. How do i do that?

Regards

G S Sundaram

[394 byte] By [gssundar75] at [2007-9-26 4:53:34]
# 1
getBytes("UTF16-BE") or getBytes("UTF16-LE"). What issupposed to be here?
jsalonen at 2007-6-29 18:46:25 > top of Java-index,Core,Core APIs...