You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Paul Libbrecht <pa...@activemath.org> on 2009/04/08 11:17:23 UTC

[io?] [all] flexible "char-array" ?

Hello commons list,

one thing I keep seeing around is people exchanging either too big  
strings, byte-arrays, or stringbuffers. It looks like, they one has  
still not found something sensible that describes something close to  
an array of characters so:

- that can give its length
- that can be read and re-read
- with a variant can be  changed to (e.g. with a writer)

but something that is flexible enough so that:

- it does not reserve a block of contiguous bytes in RAM!
- it scales pretty big
- maybe it even has regions mapped into file

where should I look for such a family of objects?
Commons-IO could be such maybe?

paul

PS: last I looked, many many many people serialize massive document as  
XML, that is good, but they exchange that XML as string!

Re: [io?] [all] flexible "char-array" ?

Posted by Paul Libbrecht <pa...@activemath.org>.
That may be well the case, the need for such flexibility in images is  
probably there, however if this would be adopted it really need  
appropriate names, something of the sort BigString.

paul


Le 08-avr.-09 à 11:36, Jörg Schaible a écrit :

> Have a look at the different ImageInputStream/ImageOutputStream
> implementations. In fact, they don't have to be used for images  
> only ;-)


Re: [io?] [all] flexible "char-array" ?

Posted by Jörg Schaible <jo...@gmx.de>.
Paul Libbrecht wrote at Mittwoch, 8. April 2009 11:17:

> 
> Hello commons list,
> 
> one thing I keep seeing around is people exchanging either too big
> strings, byte-arrays, or stringbuffers. It looks like, they one has
> still not found something sensible that describes something close to
> an array of characters so:
> 
> - that can give its length
> - that can be read and re-read
> - with a variant can be  changed to (e.g. with a writer)
> 
> but something that is flexible enough so that:
> 
> - it does not reserve a block of contiguous bytes in RAM!
> - it scales pretty big
> - maybe it even has regions mapped into file
> 
> where should I look for such a family of objects?
> Commons-IO could be such maybe?
> 
> paul
> 
> PS: last I looked, many many many people serialize massive document as
> XML, that is good, but they exchange that XML as string!

Have a look at the different ImageInputStream/ImageOutputStream
implementations. In fact, they don't have to be used for images only ;-)

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org