private void
parseTTLClassAndType() throws IOException {
	String s;
	boolean seen_class = false;


	// This is a bit messy, since any of the following are legal:
	//   class ttl type
	//   ttl class type
	//   class type
	//   ttl type
	//   type
	seen_class = false;
	s = st.getString();
	if ((currentDClass = DClass.value(s)) >= 0) {
		s = st.getString();
		seen_class = true;
	}

	currentTTL = -1;
	try {
		currentTTL = TTL.parseTTL(s);
		s = st.getString();
	}
	catch (NumberFormatException e) {
		if (defaultTTL >= 0)
			currentTTL = defaultTTL;
		else if (last != null)
			currentTTL = last.getTTL();
	}

	if (!seen_class) {
		if ((currentDClass = DClass.value(s)) >= 0) {
			s = st.getString();
		} else {
			currentDClass = DClass.IN;
		}
	}

	if ((currentType = Type.value(s)) < 0)
		throw st.exception("Invalid type '" + s + "'");

	// BIND allows a missing TTL for the initial SOA record, and uses
	// the SOA minimum value.  If the SOA is not the first record,
	// this is an error.
	if (currentTTL < 0) {
		if (currentType != Type.SOA)
			throw st.exception("missing TTL");
		needSOATTL = true;
		currentTTL = 0;
	}
}
Initializes the master file reader.
@param in The input stream containing a master file.
src/main/java/core/org/xbill/DNS/Master.java