[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[imp-dev] Heads up on pdb.values inputstreams and outputstreams
- From: Jurgen Vinju <Jurgen.Vinju@xxxxxx>
- Date: Sat, 7 Jan 2012 22:26:40 +0100
- Delivered-to: email@example.com
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
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.
- Centrum Wiskunde & Informatica - SEN1
- INRIA Lille - ATEAMS
- Universiteit van Amsterdam