Open the header record.
@return The new header record.
356689
public Record openHeaderRecord()
    {
        Record record = null;
        this.syncContactTypeToMain();    // Read in the current contact record
        ReferenceField fldContactType = (ReferenceField)this.getMainRecord().getField(MessageDetail.CONTACT_TYPE_ID);
        ContactType recContactType = (ContactType)fldContactType.getReferenceRecord(this);
        recContactType = (ContactType)fldContactType.getReference(); // Being careful
        String strHeaderRecordName = null;
        if (recContactType != null)
            strHeaderRecordName = recContactType.getField(ContactType.CODE).toString();
        if ((strHeaderRecordName == null) || (strHeaderRecordName.length() == 0))
            strHeaderRecordName = this.getProperty(fldContactType.getFieldName());
        record = recContactType.makeRecordFromRecordName(strHeaderRecordName, this);
        if (record != null)
                ((ReferenceField)this.getMainRecord().getField(MessageDetail.PERSON_ID)).setReferenceRecord(record);
        return record;
    }
853886
public E read() throws IOException {
		boolean status = false;
		try {

			// Read header if not already read
			readHeader();

			// Read the records
			E element;
			try {
				do {
					element = readRecord(this.nextExpectedRecordIndex);
					if (!postRecordReadingStage(element)) {
						element = null;
					}
					++this.nextExpectedRecordIndex;
				}
				while (element == null);
			} catch (EOFException e) {
				element = null;
				close();
				postReadingStage(true);
			}
			status = true;

			return element;
		} finally {
			if (this.taskProgression != null) {
				this.taskProgression.setValue(this.buffer.position() + HEADER_BYTES);
			}
			if (!status) {
				close();
				postReadingStage(status);
			}
		}
	}
387928
public Map<String, Collection<String>> headers() {
    Map<String, Collection<String>> headerMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
    this.headers.forEach((key, headerTemplate) -> {
      List<String> values = new ArrayList<>(headerTemplate.getValues());

      /* add the expanded collection, but only if it has values */
      if (!values.isEmpty()) {
        headerMap.put(key, Collections.unmodifiableList(values));
      }
    });
    return Collections.unmodifiableMap(headerMap);
  }
777701
public Record
_nextRecord() throws IOException {
	Tokenizer.Token token;
	String s;

	if (included != null) {
		Record rec = included.nextRecord();
		if (rec != null)
			return rec;
		included = null;
	}
	if (generator != null) {
		Record rec = nextGenerated();
		if (rec != null)
			return rec;
		endGenerate();
	}
	while (true) {
		Name name;

		token = st.get(true, false);
		if (token.type == Tokenizer.WHITESPACE) {
			Tokenizer.Token next = st.get();
			if (next.type == Tokenizer.EOL)
				continue;
			else if (next.type == Tokenizer.EOF)
				return null;
			else
				st.unget();
			if (last == null)
				throw st.exception("no owner");
			name = last.getName();
		}
		else if (token.type == Tokenizer.EOL)
			continue;
		else if (token.type == Tokenizer.EOF)
			return null;
		else if (((String) token.value).charAt(0) == '$') {
			s = token.value;

			if (s.equalsIgnoreCase("$ORIGIN")) {
				origin = st.getName(Name.root);
				st.getEOL();
				continue;
			} else if (s.equalsIgnoreCase("$TTL")) {
				defaultTTL = st.getTTL();
				st.getEOL();
				continue;
			} else  if (s.equalsIgnoreCase("$INCLUDE")) {
				String filename = st.getString();
				File newfile;
				if (file != null) {
					String parent = file.getParent();
					newfile = new File(parent, filename);
				} else {
					newfile = new File(filename);
				}
				Name incorigin = origin;
				token = st.get();
				if (token.isString()) {
					incorigin = parseName(token.value,
							      Name.root);
					st.getEOL();
				}
				included = new Master(newfile, incorigin,
						      defaultTTL);
				/*
				 * If we continued, we wouldn't be looking in
				 * the new file.  Recursing works better.
				 */
				return nextRecord();
			} else  if (s.equalsIgnoreCase("$GENERATE")) {
				if (generator != null)
					throw new IllegalStateException
						("cannot nest $GENERATE");
				startGenerate();
				if (noExpandGenerate) {
					endGenerate();
					continue;
				}
				return nextGenerated();
			} else {
				throw st.exception("Invalid directive: " + s);
			}
		} else {
			s = token.value;
			name = parseName(s, origin);
			if (last != null && name.equals(last.getName())) {
				name = last.getName();
			}
		}

		parseTTLClassAndType();
		last = Record.fromString(name, currentType, currentDClass,
					 currentTTL, st, origin);
		if (needSOATTL) {
			long ttl = ((SOARecord)last).getMinimum();
			last.setTTL(ttl);
			defaultTTL = ttl;
			needSOATTL = false;
		}
		return last;
	}
}
768568
public Record []
expand() throws IOException {
	List list = new ArrayList();
	for (long i = start; i < end; i += step) {
		String namestr = substitute(namePattern, current);
		Name name = Name.fromString(namestr, origin);
		String rdata = substitute(rdataPattern, current);
		list.add(Record.fromString(name, type, dclass, ttl,
					   rdata, origin));
	}
	return (Record []) list.toArray(new Record[list.size()]);
}
835271
private static Record createRecord(String data) {
        return new Record().withData(ByteBuffer.wrap(data.getBytes()));
    }
127550
def new(self):
        # type: () -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('RR record already initialized!')

        self.rr_flags = 0
        self._initialized = True
821290
public OkRequest<T> header(final Map.Entry<String, String> header) {
        return header(header.getKey(), header.getValue());
    }
136249
public static VcfHeader header(final Readable readable) throws IOException {
        checkNotNull(readable);
        ParseListener parseListener = new ParseListener();
        VcfParser.parse(readable, parseListener);
        return parseListener.getHeader();
    }
810496
public Record openMainRecord()
    {
        Record record = Record.makeRecordFromClassName(MenusModel.THICK_CLASS, this);
        record.setOpenMode(DBConstants.OPEN_READ_ONLY);   // This will optimize the cache when client is remote.
        return record;
    }
180726
LogFileHeader logFileHeader() throws InternalLogException
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "logFileHeader", this);

        // Check that the file is actually open
        if (_activeFile == null)
        {
            if (tc.isEntryEnabled())
                Tr.exit(tc, "logFileHeader", "InternalLogException");
            throw new InternalLogException(null);
        }

        final LogFileHeader logFileHeader = _activeFile.logFileHeader();

        if (tc.isEntryEnabled())
            Tr.exit(tc, "logFileHeader", logFileHeader);
        return logFileHeader;
    }
949786
public synchronized Headers takeHeaders() throws IOException {
    readTimeout.enter();
    try {
      while (headersQueue.isEmpty() && errorCode == null) {
        waitForIo();
      }
    } finally {
      readTimeout.exitAndThrowIfTimedOut();
    }
    if (!headersQueue.isEmpty()) {
      return headersQueue.removeFirst();
    }
    throw errorException != null ? errorException : new StreamResetException(errorCode);
  }
714573
DataInputStream openDataInputStream()
	{
		final InputStream is = getInputStream();
		if (is instanceof DataInputStream) {
			return (DataInputStream) is;
		}
		return new DataInputStream(is);
	}
935151
public OpenAPIConnection header(String headerName, String headerValue) {
        this.headers.put(headerName, headerValue);
        return this;
    }
857074
public Record getHistoryRecord()
    {
        if (m_recDependent == null)
        {
            if (m_strRecHistoryClass != null)
            {
                m_recDependent = Record.makeRecordFromClassName(m_strRecHistoryClass, Record.findRecordOwner(this.getOwner()));
                if (m_recDependent != null)
                {
                    m_bCloseOnFree = true;
                    m_recDependent.addListener(new FileRemoveBOnCloseHandler(this));    // Being careful
                    if (m_recDependent.getListener(RecordChangedHandler.class) != null)
                        m_recDependent.removeListener(this.getOwner().getListener(RecordChangedHandler.class), true);  // I replace this listener
                }                    
            }
        }
        return m_recDependent;
    }
439194
public DBaseFileRecord readNextDBFRecord() throws IOException {
		if (this.recordCount == -1) {
			throw new MustCallReadHeaderFunctionException();
		}
		if (this.readingPosition >= this.recordCount) {
			return null;
		}

		try {
			// Update the readingPosition attribute AFTER the call to the
			// reading function to avoid invalid usage of its value
			// by this function.
			final DBaseFileRecord record = readDBFRecord(this.readingPosition);
			++this.readingPosition;
			return record;
		} catch (EOFException e) {
			this.finished = true;
			return null;
		}
	}
1271740
public String getTitle()    // Standard file maint for this record (returns new record)
    {
        String strTitle = "Query"; // Default
        Record record = this.getMainRecord();
        if (record != null)
            strTitle = record.getRecordName() + ' ' + strTitle;
        return strTitle;
    }