This returns the first header in the data file
348140
def header(self):
    '''
    

    '''
    if self._header is None:
      self._header = self._read_half_frame_header(self.data)

    return self._header
1341588
public function getResponseHeader($key, $first = true): string
    {
        $header = $this->response->getHeader($key);
        $headerFirst = $header[0] ?? '';
        return $first ? $headerFirst : $header;
    }
919142
def read_header(self):
        """"""
        format = '!HHHHHH'
        length = struct.calcsize(format)
        info = struct.unpack(format,
                self.data[self.offset:self.offset + length])
        self.offset += length

        self.id = info[0]
        self.flags = info[1]
        self.num_questions = info[2]
        self.num_answers = info[3]
        self.num_authorities = info[4]
        self.num_additionals = info[5]
1085233
def to_header_str(self):
        
        h_parts = []
        if self.root:
            h_parts.append(ROOT + '=' + self.root)
        if self.parent:
            h_parts.append(PARENT + '=' + self.parent)
        if self.sampled is not None:
            h_parts.append(SAMPLE + '=' + str(self.sampled))
        if self.data:
            for key in self.data:
                h_parts.append(key + '=' + self.data[key])

        return HEADER_DELIMITER.join(h_parts)
756384
def get_header(self, name, default_value=None):
        
        name_lower = name.lower()
        for value in self.headers:
            if value[0].lower() == name_lower:
                return value[1]

        return default_value
362905
def __header(self, line):
        
        self.cpu_number = len(line.split())
        return self.cpu_number
1196867
def getHeader(self,exten=None):
        
        _image=fileutil.openImage(self._filename, clobber=False, memmap=False)
        _header=fileutil.getExtn(_image,extn=exten).header
        _image.close()
        del _image
        return _header
621067
def build_headermap(headers):
    
    # TODO: what happens if some headers are circularly dependent?
    headermap = {}
    for hfile in headers:
        headermap[hfile] = None
    for hfile in headers:
        assert (hfile.startswith("c/") or
                hfile.startswith("datatable/include/"))
        inc = find_includes(hfile)
        for f in inc:
            assert f != hfile, "File %s includes itself?" % f
            assert f.startswith("c/")
            if f not in headers:
                raise ValueError("Unknown header \"%s\" included from %s"
                                 % (f, hfile))
        headermap[hfile] = set(inc)
    return headermap
812213
def header(self):
        

        if self._header_encoding is None:
            return self._header
        else:
            return self._header.decode(self._header_encoding)
1295801
def header(self):
    """"""
    return struct.pack(
        self.HEADER_STRUCT_FORMAT, self._command, self.arg0, self.arg1,
        len(self.data), self.data_crc32, self.magic)
218098
def get_header(self, idx, formatted=False):
        
        header = self._uname if not formatted else self._fname
        return [header[x] for x in idx]
1022175
def get_first_char fname
      if File.exists? fname
        begin
          f = Zlib::GzipReader.open fname
        rescue Zlib::GzipFile::Error
          f = File.open fname
        end


        begin
          first_char = f.each.peek[0]

          return first_char
        ensure
          f.close
        end
      else
        raise ParseFasta::Error::FileNotFoundError,
              "No such file or directory -- #{fname}"
      end
    end
116099
def _get_header(self):
        """"""
        fh = self._src
        obj = _make_object("Header")

        # first part of the header
        obj.Signature = sign = "".join(chr(unpack_ui8(fh)) for _ in range(3))
        obj.Version = self._version = unpack_ui8(fh)
        obj.FileLength = file_length = unpack_ui32(fh)

        # deal with compressed content
        if sign[0] == 'C':
            uncompressed = zlib.decompress(fh.read())
            if len(uncompressed) + 8 != file_length:
                raise ValueError("Problems dealing with compressed content")
            fh = self._src = io.BytesIO(uncompressed)

        # second part of the header
        obj.FrameSize = self._get_struct_rect()
        obj.FrameRate = unpack_ui16(fh)
        obj.FrameCount = unpack_ui16(fh)
        return obj
167014
def _read_header(filename):
    
    with filename.open('rb') as f:
        h = f.read(HDR_LENGTH).decode()

        header = {}
        for line in h.split('\n'):
            if '=' in line:
                key, value = line.split(' = ')
                key = key.strip()[7:]
                value = value.strip()[:-1]
                header[key] = value

    return header
691004
def headers(self, serialize_cell=None):
    """"""
    if serialize_cell is None:
      serialize_cell = self.get_cell_value
    return [serialize_cell(cell) for cell in self.rows[0]]
1271705
def getheader(self, header, default=None):
        '''
        
        '''
        if isinstance(header, str):
            return self.headers.get(header.lower(), default)
        return self.__rawheaders.get(header, default)
760255
private long[] getRowAddressesFromHeader( ByteBuffer header ) {
        /*
         * Jump over the no more needed first byte (used in readHeader to define the header size)
         */
        byte firstbyte = header.get();

        /* Read the data row addresses inside the file */
        long[] adrows = new long[fileWindow.getRows() + 1];
        if (firstbyte == 4) {
            for( int i = 0; i <= fileWindow.getRows(); i++ ) {
                adrows[i] = header.getInt();
            }
        } else if (firstbyte == 8) {
            for( int i = 0; i <= fileWindow.getRows(); i++ ) {
                adrows[i] = header.getLong();
            }
        } else {
            // problems
        }
        return adrows;
    }