Mercurial > hg > monetdb-java
comparison src/main/java/org/monetdb/mcl/io/BufferedMCLWriter.java @ 700:940e266eeccd
Refactor BufferedMCLReader
It used to inherit from BufferedReader but there is no reason for that.
Also, it used to have a method readLine() which
- returned the line read
- stored the linetype
In the new setup we have a method advance() which reads
a line and stores both it and its type.
This makes the code more regular and makes it possible to
peek ahead without consuming.
author | Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> |
---|---|
date | Thu, 08 Dec 2022 15:59:17 +0100 (2022-12-08) |
parents | 6aa38e8c0f2d |
children | aeb268156580 |
comparison
equal
deleted
inserted
replaced
699:0ff364f569a1 | 700:940e266eeccd |
---|---|
96 write(line); | 96 write(line); |
97 flush(); | 97 flush(); |
98 | 98 |
99 // reset reader state, last line isn't valid any more now | 99 // reset reader state, last line isn't valid any more now |
100 if (reader != null) | 100 if (reader != null) |
101 reader.setLineType(null); | 101 reader.resetLineType(); |
102 } | 102 } |
103 } | 103 } |