class_docstr: Raw I/O implementation the input and output stream is resettable.
docstr: Read up to len(b) bytes into the writable buffer *b* and return
  the number of bytes read. If no bytes are available, None is returned.
docstr_tok: ["Read","up","to","len","(","b",")","bytes","into","the","writable","buffer","*","b","*","and","return","the","number","of","bytes","read",".","If","no","bytes","are","available",",","None","is","returned","."]
code: def readinto(self, b):
      """
      Read up to len(b) bytes into the writable buffer *b* and return
      the number of bytes read. If no bytes are available, None is returned.
      """
      output_buffer_len = len(b)
      remaining = self._size - self._input_offset
  
      if remaining >= output_buffer_len:
          b[:] = self._input_bytes[
              self._input_offset : self._input_offset
              + output_buffer_len
          ]
          self._input_offset += output_buffer_len
          return output_buffer_len
      elif remaining > 0:
          b[:remaining] = self._input_bytes[
              self._input_offset : self._input_offset + remaining
          ]
          self._input_offset = self._size
          return remaining
      else:
          return None
  
file_path: flink/flink-python/pyflink/fn_execution/ResettableIO.py
imports: import io
label_desc: Use image node_id 2 for calling the ResettableIO obj's underlying member method code with example usage: obj.readinto(b) and returns: output_buffer_len, remaining, None