[brailleblaster] byte arrays versus strings

  • From: "qubit" <lauraeaves@xxxxxxxxx>
  • To: <brailleblaster@xxxxxxxxxxxxx>
  • Date: Thu, 9 Dec 2010 19:25:06 -0600

Ok, this is where I need JohnB's expertise with characters and byte strings. 
Of course, anyone else can chime in too.

I have a buffered stream going from brailleblaster to the input of process 
just spawned, and 2 streams coming back for standard error and standard out.

I will be managing the pipes in a class constructor / finalizer.
My question is, in the docs for the input and output streams in java.io, 
there are subclasses that manage byte arrays and subclasses that do just 
character strings.
My class will provide you with a read and a write method.  Should I just 
assume that everything that goes over the pipe is a character stream, or are 
there cases where I can't assume that?

Should this be a character stream or a byte stream?
Should I use threads that handle the input and output on these streams?

I am trying to get all my "ducks in a row" as a family member likes to say.
Any comments are welcome.
--le 


Other related posts: