Re: Interactive tracing ...



Lew <lew@xxxxxxxxxxxxx> wrote:
Mark Space wrote:
Andreas Leitgeb wrote:
Especially finding the right stacking of streams and readers is something
that would have taken me a lot of time to get right - Thanks for saving me
that work! :-)
This is perennial complaint of mine as well.
In general, the Stream classes are older, ...
The Stream classes may be slightly older, in that it took all the way until
Java 1.1 [1] until they introduced Readers and Writers, but by no means does
that mean that Streams are deficient or no longer relevant. (What
"deficiencies" were found in Streams, anyway?)

I guess he means the unlucky decision to add a (since deprecated) readLine()
to the *InputStream-family.

The real difference, and the important one, is that Streams handle bytes and
Readers/Writers handle characters and their encodings.
So far it's clear, but it's not trivially obvious which *Reader class
can be wrapped on what *Stream class, and what interims-wrappers I need
to be finally able to read a whole line (->BufferedReader) from System.in .

I love the Scanner, though. Just pass it a File or System.in or a
String, and you get all the tokens you want.

.



Relevant Pages

  • Re: Writing listbox items into text file
    ... Check the Stream Classes and their derivates ... classes instead of using Stream Writer's "writeline" method. ... If append is true, previous + current items are saved into text file. ... i want to save what and how i see in listbox items as text ...
    (microsoft.public.dotnet.languages.vb)
  • portable way to define new stream classes?
    ... In Lispworks I can define my own stream classes, ... I have the source code of the framework and can change it. ... (vector-push-extend byte (slot-value self 'content))) ...
    (comp.lang.lisp)
  • Re: portable way to define new stream classes?
    ... > In Lispworks I can define my own stream classes, ... Most implementations provide a way customize streams, ... can define customized stream classes in portable Common Lisp. ... the stream object, since it won't satisfy the streamp predicate. ...
    (comp.lang.lisp)
  • Re: ostream_iterator with namespaced types - BUG?
    ... > void works ... std::wostringstream&, not Stream, so your operator taking a Stream& does ... Stream classes were not designed for being derived from. ...
    (microsoft.public.vc.stl)