code: def __shapefileHeader(self, fileObj, headerType='shp'):
          
          f = self.__getFileObj(fileObj)
          f.seek(0)
          # File code, Unused bytes
          f.write(pack(">6i", 9994,0,0,0,0,0))
          # File length (Bytes / 2 = 16-bit words)
          if headerType == 'shp':
              f.write(pack(">i", self.__shpFileLength()))
          elif headerType == 'shx':
              f.write(pack('>i', ((100 + (len(self._shapes) * 8)) // 2)))
          # Version, Shape type
          f.write(pack("<2i", 1000, self.shapeType))
          # The shapefile's bounding box (lower left, upper right)
          if self.shapeType != 0:
              try:
                  f.write(pack("<4d", *self.bbox()))
              except error:
                  raise ShapefileException("Failed to write shapefile bounding box. Floats required.")
          else:
              f.write(pack("<4d", 0,0,0,0))
          # Elevation
          z = self.zbox()
          # Measure
          m = self.mbox()
          try:
              f.write(pack("<4d", z[0], z[1], m[0], m[1]))
          except error:
              raise ShapefileException("Failed to write shapefile elevation and measure values. Floats required.")
docs: Writes the specified header type to the specified file-like object.
          Several of the shapefile formats are so similar that a single generic
          method to read or write them is warranted.