1 package persistence.antlr; 2 3 8 9 21 22 import java.io.Reader ; import java.io.IOException ; 24 25 28 public class CharBuffer extends InputBuffer { 29 transient Reader input; 31 32 33 public CharBuffer(Reader input_) { super(); 35 input = input_; 36 } 37 38 39 public void fill(int amount) throws CharStreamException { 40 try { 41 syncConsume(); 42 while (queue.nbrEntries < amount + markerOffset) { 44 queue.append((char)input.read()); 46 } 47 } 48 catch (IOException io) { 49 throw new CharStreamIOException(io); 50 } 51 } 52 } 53 | Popular Tags |