MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / _nextRecord

Method _nextRecord

src/main/java/core/org/xbill/DNS/Master.java:272–375  ·  view source on GitHub ↗

Returns the next record in the master file. This will process any directives before the next record. @return The next record. @throws IOException The master file could not be read, or was syntactically invalid.

()

Source from the content-addressed store, hash-verified

270 * invalid.
271 */
272public Record
273_nextRecord() throws IOException {
274 Tokenizer.Token token;
275 String s;
276
277 if (included != null) {
278 Record rec = included.nextRecord();
279 if (rec != null)
280 return rec;
281 included = null;
282 }
283 if (generator != null) {
284 Record rec = nextGenerated();
285 if (rec != null)
286 return rec;
287 endGenerate();
288 }
289 while (true) {
290 Name name;
291
292 token = st.get(true, false);
293 if (token.type == Tokenizer.WHITESPACE) {
294 Tokenizer.Token next = st.get();
295 if (next.type == Tokenizer.EOL)
296 continue;
297 else if (next.type == Tokenizer.EOF)
298 return null;
299 else
300 st.unget();
301 if (last == null)
302 throw st.exception("no owner");
303 name = last.getName();
304 }
305 else if (token.type == Tokenizer.EOL)
306 continue;
307 else if (token.type == Tokenizer.EOF)
308 return null;
309 else if (((String) token.value).charAt(0) == '$') {
310 s = token.value;
311
312 if (s.equalsIgnoreCase("$ORIGIN")) {
313 origin = st.getName(Name.root);
314 st.getEOL();
315 continue;
316 } else if (s.equalsIgnoreCase("$TTL")) {
317 defaultTTL = st.getTTL();
318 st.getEOL();
319 continue;
320 } else if (s.equalsIgnoreCase("$INCLUDE")) {
321 String filename = st.getString();
322 File newfile;
323 if (file != null) {
324 String parent = file.getParent();
325 newfile = new File(parent, filename);
326 } else {
327 newfile = new File(filename);
328 }
329 Name incorigin = origin;

Callers 1

nextRecordMethod · 0.95

Calls 15

nextRecordMethod · 0.95
nextGeneratedMethod · 0.95
endGenerateMethod · 0.95
parseNameMethod · 0.95
startGenerateMethod · 0.95
equalsMethod · 0.95
parseTTLClassAndTypeMethod · 0.95
fromStringMethod · 0.95
ungetMethod · 0.80
exceptionMethod · 0.80
getEOLMethod · 0.80
isStringMethod · 0.80

Tested by

no test coverage detected