On Wed, 22 Sep 1999, Suvarna Ayyagari wrote:
> Hi,
>
> I have a question and I do not know if this is feasible with Tclblend
>
> Let us say I have a java method on object 'obj' that returns a byte array to
> me. And the method name is 'readData' and the contents of the byte array
> returned to me is of 3 bytes with the following values,
>
> byte b[] = { (byte) 0xFF, (byte) 0x80, 0x06}
>
> and let us say I call this method using tclblend
>
> set b [$obj readData]
I would think you would need to create a StringBuffer, print the
values as Hex into the string buffer, remove everything before the
0x part, and then append it onto another StringBuffer. You should
be able to do all this in Java code, so it should work in TclJava
too. In fact, it might be easier to use Tcl's format and append
commands to do this directly in Tcl Blend.
I hope that helps
Mo DeJong
> What I would like to have is a concatenated hex string of all the elements
> in the byte array such as {FF8006}. Is this feasible ?
> I appreciate any help.
>
> thanks
> Suvarna
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
> ----------------------------------------------------------------
> The TclJava mailing list is sponsored by WebNet Technologies.
> To subscribe: send mail to [EMAIL PROTECTED]
> with the word SUBSCRIBE as the subject.
> To unsubscribe: send mail to [EMAIL PROTECTED]
> with the word UNSUBSCRIBE as the subject.
> To send to the list, send email to '[EMAIL PROTECTED]'.
> A list archive is at: http://www.findmail.com/listsaver/tcldallas/
>
----------------------------------------------------------------
The TclJava mailing list is sponsored by WebNet Technologies.
To subscribe: send mail to [EMAIL PROTECTED]
with the word SUBSCRIBE as the subject.
To unsubscribe: send mail to [EMAIL PROTECTED]
with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'.
A list archive is at: http://www.findmail.com/listsaver/tcldallas/