#NEWLINE# def __init__( self , dxid = None , project = None , mode = None , read_buffer_size = DEFAULT_BUFFER_SIZE , write_buffer_size = DEFAULT_BUFFER_SIZE , expected_file_size = None , file_is_mmapd = False ) : #NEWLINE# #INDENT# '\n        :param dxid: Object ID\n        :type dxid: string\n        :param project: Project ID\n        :type project: string\n        :param mode: One of "r", "w", or "a" for read, write, and append\n            modes, respectively\n        :type mode: string\n        :param read_buffer_size: size of read buffer in bytes\n        :type read_buffer_size: int\n        :param write_buffer_size: hint for size of write buffer in\n            bytes. A lower or higher value may be used depending on\n            region-specific parameters and on the expected file size.\n        :type write_buffer_size: int\n        :param expected_file_size: size of data that will be written, if\n            known\n        :type expected_file_size: int\n        :param file_is_mmapd: True if input file is mmap\'d (if so, the\n            write buffer size will be constrained to be a multiple of\n            the allocation granularity)\n        :type file_is_mmapd: bool\n        ' #NEWLINE# DXDataObject . __init__ ( self , dxid = dxid , project = project ) #NEWLINE# if ( mode is None ) : #NEWLINE# #INDENT# self . _close_on_exit = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( mode not in [ 'r' , 'w' , 'a' ] ) : #NEWLINE# #INDENT# raise ValueError ( "mode must be one of 'r', 'w', or 'a'" ) #NEWLINE# #UNINDENT# self . _close_on_exit = ( mode == 'w' ) #NEWLINE# #UNINDENT# self . _read_buf = BytesIO ( ) #NEWLINE# self . _write_buf = BytesIO ( ) #NEWLINE# self . _read_bufsize = read_buffer_size #NEWLINE# self . _write_bufsize = None #NEWLINE# self . _write_buffer_size_hint = write_buffer_size #NEWLINE# self . _expected_file_size = read_buffer_size #NEWLINE# self . _file_is_mmapd = file_is_mmapd #NEWLINE# ( self . _download_url , self . _download_url_headers , self . _download_url_expires ) = ( None , None , None ) #NEWLINE# self . _url_download_mutex = Lock ( ) #NEWLINE# ( self . _request_iterator , self . _response_iterator ) = ( None , None ) #NEWLINE# self . _http_threadpool_futures = set ( ) #NEWLINE# self . _pos = 0 #NEWLINE# self . _file_length = None #NEWLINE# self . _cur_part = 1 #NEWLINE# self . _num_uploaded_parts = 0