The Artima Developer Community
Sponsored Link

Java Buzz Forum
I/O Iterators for Java

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Rod Waldhoff

Posts: 99
Nickname: rwald
Registered: Jun, 2003

Rod Waldhoff is.
I/O Iterators for Java Posted: Jul 7, 2003 12:13 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Rod Waldhoff.
Original Post: I/O Iterators for Java
Feed Title: Rod Waldhoff: Java Channel
Feed URL: http://radio-weblogs.com/0122027/categories/java/rss.xml
Feed Description: about the Java programming language
Latest Java Buzz Posts
Latest Java Buzz Posts by Rod Waldhoff
Latest Posts From Rod Waldhoff: Java Channel

Advertisement
While fleshing out the remaining parts of the primitives package in Commons Collections, a simple but potentially powerful feature became apparent. Using the byte-based primitive collections, it's not only easy but also efficient to bring together the I/O and Collections APIs via ByteIterator/InputStream adapters. This allows one to treat any InputStream as a ByteIterator (and hence as an Iterator over Bytes) without resorting to a byte array buffer. This means that Iterator-based APIs like the functor algorithms can be applied to I/O streams. Similarly, this allows one to treat any ByteCollection (or Collection of Bytes) as a source for InputStreams. This means that stream-based APIs can be applied to ByteCollections and Collections of Bytes. This brings Java one small step closer to the conceptual uniformity and resulting combinatorial expressiveness enjoyed by languages like Lisp. This is reason enough in my mind to extend the primitive collections to Char/char and to Reader-adapters as well. (Also see this related post.)
Update: [17 April 2003] I've added char types to the primitives package, as well as CharIterator/Reader adapters.

Read: I/O Iterators for Java

Topic: What's the difference between Apache and BSD? Previous Topic   Next Topic Topic: OpenSource vs Java

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use