Lines Matching refs:reader
160 Reader reader = new InputStreamReader(is)) { in parse()
161 parse(reader, url.toString(), mode); in parse()
174 private void parse(Reader reader, String source, ModeId mode) throws IOException { in parse() argument
176 try (JsonReader jsonReader = new JsonReader(reader)) { in parse()
189 private void readExpectation(JsonReader reader, ModeId mode) throws IOException { in readExpectation() argument
199 reader.beginObject(); in readExpectation()
200 while (reader.hasNext()) { in readExpectation()
201 String name = reader.nextName(); in readExpectation()
203 result = Result.valueOf(reader.nextString()); in readExpectation()
205 names.add(reader.nextString()); in readExpectation()
207 readStrings(reader, names); in readExpectation()
216 names.add(reader.nextString()); in readExpectation()
218 pattern = Pattern.compile(reader.nextString(), PATTERN_FLAGS); in readExpectation()
220 … pattern = Pattern.compile(".*" + Pattern.quote(reader.nextString()) + ".*", PATTERN_FLAGS); in readExpectation()
222 readStrings(reader, tags); in readExpectation()
224 …able<String> split = Splitter.on("\n").omitEmptyStrings().trimResults().split(reader.nextString()); in readExpectation()
227 buganizerBug = reader.nextLong(); in readExpectation()
229 modes = readModes(reader); in readExpectation()
232 reader.skipValue(); in readExpectation()
235 reader.endObject(); in readExpectation()
238 throw new IllegalArgumentException("Missing 'name' or 'failure' key in " + reader); in readExpectation()
253 private void readStrings(JsonReader reader, Set<String> output) throws IOException { in readStrings() argument
254 reader.beginArray(); in readStrings()
255 while (reader.hasNext()) { in readStrings()
256 output.add(reader.nextString()); in readStrings()
258 reader.endArray(); in readStrings()
261 private Set<ModeId> readModes(JsonReader reader) throws IOException { in readModes() argument
263 reader.beginArray(); in readModes()
264 while (reader.hasNext()) { in readModes()
265 result.add(ModeId.valueOf(reader.nextString().toUpperCase())); in readModes()
267 reader.endArray(); in readModes()