[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[imp-dev] Heads up on pdb.values inputstreams and outputstreams

Hi Imps,

There has been some work to make pdb.values unicode friendly. Some
methods have been added to IString to hide complexity about
codepoints, UTF16 encodings and such.

The IValueReader and IValueWriter interface were not so friendly to
unicode since they work with InputStreams and OutputStreams.
The solution is to create two new interfaces: IValueTextReader and
IValueTextWriter which read and write using java.io.Reader and
java.io.Writer.
Consequently the existing (binary) interfaces have been renamed to
IValueBinaryReader and IValueBinaryWriter.

To read a value from a textual source, such a a string, is easier now:
x = new StandardTextReader();
x.read(...., new StringReader(yourString));

Thank you for your patience while updating your code!
  * Simply replace bytes by chars and your fine.
  * If you use the binary API you should not notice most of the
refactoring unless you've implemented these interfaces yourself.
  * Two exceptions: rename PBFWriter to BinaryValueWriter and
PBFReader to BinaryValueReader.

Cheers,

Jurgen

-- 
Jurgen Vinju
- Centrum Wiskunde & Informatica - SEN1
- INRIA Lille - ATEAMS
- Universiteit van Amsterdam

  www: http://jurgen.vinju.org,
http://www.rascal-mpl.org,http://twitter.com/jurgenvinju
skype: jurgen.vinju