If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

lets say if the buffer has 01 01 01 ..it should be sent as 0x7e 01 01 01

0x7e

so in the code below I am first writing 0x7e

then I am iterating over each element in the buffer and doing some

processing and wring the individual elements...

at the end os iteration I am writing the last 0x7e

hence on the socket I want the out put to be 0x7e 01 01 01 0x7e

but the problem is

first it is writing 0x7e just as 1 byte

and after that it is writing the rest of the 4 bytes 01 01 01 0x7e

thats a problem.....

as it is only when the server gets the info as 0x7e 01 01 01 0x7e it can

understand as a bind request but as it is getting data in two sections

i.e first 0x7e and after that the rest of the 4 bytes...

it is not able to interpret it to be as a bind request and rejecting the

transaction....

so what I am doing is I am loading the buffer value into a locally created
array list and then moving the values of the arraylist into another byte
array and then writing the byte array atonce onto the stream...

when I am printing the values from the arraylist it is printing correctly

similarly when I am printing values from the byte array b1 after moving the
values from the arraylist a1 then also it is printing the correct values..but
when I am writing the same byte array b1 on to the socket the server is getting
4 null values for 1st 4 byte and the last one correctly.....I think its bit
a confusing...but if U are able to follow something then just help me..otherwise
I will try by myself....

Re: no one is helping me.....in the group I dont know why ?? pls help

There really is little java discussion here (Devx). Everything seems to be
geared towards MS technology and most of those using the newsgroups here
are using that technology. There are a few of us others hanging out here.

I'm not sure really what you are doing. I try to avoid the byte level stuff
and only go there when I need to, like when I am talking to C programs.