Re: What replaces StringBufferInputStream




"Chris Uppal" <chris.uppal@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:44f578f9$0$641$bed64819@xxxxxxxxxxxxxxxxxxxx

Certainly there is. You can create an OutputStream decorator which wraps
a
Writer (or an InputStream which wraps a Reader) in just the same way as an
OutputStreamWriter wraps an OutputStream. All you need is a
CharacterDecoder
(or Encoder).

The java.io package lacks such a beast, but it's trivial enough to create
your
own if you have a need for it (and -- as I said before -- if you can think
of
an acceptable name for it).

WriterOutputStream and ReaderInputStream will do.


.



Relevant Pages

  • Re: What replaces StringBufferInputStream
    ... output stream writer, for that matter) dichotomy. ... has an uderlying input stream which, I imagine, wouldn't be a problem ... underlying OutputStream for a given Writer, ... to a Reader without knowing that the bytes do represent characters ...
    (comp.lang.java.programmer)
  • Re: What replaces StringBufferInputStream
    ... underlying OutputStream for a given Writer, ... can't meaningfully expose a method for giving out an OutputStream. ... Writer (or an InputStream which wraps a Reader) in just the same way as an ...
    (comp.lang.java.programmer)
  • Re: redicting standard output
    ... you're still not launching a thread to read from the outputstream. ... public class StreamPoller ... ManualResetEvent _readEvent; ... StreamReader _reader; ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: io
    ... You can't transmit binary data in a JSP. ... By the time your JSP code ... OutputStream is to use a servlet, where you can choose whether to ... open an OutputStream or a Writer to send your output to. ...
    (comp.lang.java.databases)
  • Re: mix chars and bytes in a stream.
    ... It is safe, but you should consider carefully what you want to do it for. ... Writer w = new OutputStreamWriter; ... You should create a new Writer each time you start writing characters, ... If you write some binary to the OutputStream and then want ...
    (comp.lang.java.programmer)