I'm serializing some data by as follows:

   ByteArrayOutputStream bos = new ByteArrayOutputStream();
   DataOutputStream dos= new DataOutputStream(byteArrayOutputStream);
   dos.writeShort((short)16));
   ....

Then to get the byte array representation:


      byte [] e =  bos.toByteArray();

I have a provider to create the DOS with a new BOS, but..

Questions:
How do I get a reference to the BOS in order to call its "toByteArray()" 
method?
Alternatively, can I make the provider use a BOS that I inject in my class, 
instead of a *new* BOS created in the provider?

Thanks in advance,
Biff

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to