#NEWLINE# def __init__( self , fileobj , start_byte , chunk_size , full_file_size , callback = None , enable_callback = True ) : #NEWLINE# #INDENT# "\n\n        Given a file object shown below::\n\n            |___________________________________________________|\n            0          |                 |                 full_file_size\n                       |----chunk_size---|\n                 start_byte\n\n        :type fileobj: file\n        :param fileobj: File like object\n\n        :type start_byte: int\n        :param start_byte: The first byte from which to start reading.\n\n        :type chunk_size: int\n        :param chunk_size: The max chunk size to read.  Trying to read\n            pass the end of the chunk size will behave like you've\n            reached the end of the file.\n\n        :type full_file_size: int\n        :param full_file_size: The entire content length associated\n            with ``fileobj``.\n\n        :type callback: function(amount_read)\n        :param callback: Called whenever data is read from this object.\n\n        " #NEWLINE# self . _fileobj = fileobj #NEWLINE# self . _start_byte = start_byte #NEWLINE# self . _size = self . _calculate_file_size ( self . _fileobj , requested_size = chunk_size , start_byte = start_byte , actual_file_size = full_file_size ) #NEWLINE# self . _fileobj . seek ( self . _start_byte ) #NEWLINE# self . _amount_read = 0 #NEWLINE# self . _callback = callback #NEWLINE# self . _callback_enabled = enable_callback