getBytes
public byte[] getBytes(String enc)
throws UnsupportedEncodingException
Convert this String into bytes according to the specified character encoding, storing the result into a new byte array.
public byte[] getBytes(String enc)
throws UnsupportedEncodingException
Convert this String into bytes according to the specified character encoding, storing the result into a new byte array.
Cyc:Byte;
Str:String;
Bytes:Array[1..255] Of Char;
Begin
For Cyc:=1 To Length(Str) Do
Bytes[Cyc]:=Char(Str[Cyc]);
End.
//
static byte parseByte(String s, int radix) ;
然后给byte[];
byte[] bt=str.getBytes();