character-based i/o, use java reader/writer instead of streams