Lines Matching refs:buffer

126     the size of a fixed-size chunk buffer.  When no buffering argument is
129 * Binary files are buffered in fixed-size chunks; the size of the buffer
132 On many systems, the buffer will typically be 4096 or 8192 bytes long.
232 "mode, the default buffer size will be used",
263 buffer = BufferedRandom(raw, buffering)
265 buffer = BufferedWriter(raw, buffering)
267 buffer = BufferedReader(raw, buffering)
270 result = buffer
274 text = TextIOWrapper(buffer, encoding, errors, newline, line_buffering)
677 """Write the given buffer to the IO stream.
747 """Read bytes into buffer *b*, using at most one system call
773 """Write the given bytes buffer to the IO stream.
778 Raises BlockingIOError if the buffer is full and the
785 Separate the underlying raw stream from the buffer and return it.
787 After the raw stream has been detached, the buffer is in an unusable
904 """Buffered I/O implementation using an in-memory bytes buffer."""
923 """Return the bytes value (contents) of the buffer
930 """Return a readable and writable view of the buffer.
1049 A buffer for a readable, sequential BaseRawIO object.
1064 raise ValueError("invalid buffer size")
1137 self._read_buf = out[n:] # Save the extra data in the buffer.
1196 # First try to read from internal buffer
1206 # If remaining space in callers buffer is larger than
1207 # internal buffer, read directly into callers buffer
1214 # Otherwise refill internal buffer - unless we're
1241 """A buffer for a writeable sequential RawIO object.
1254 raise ValueError("invalid buffer size")
1271 # We're full, so let's pre-flush the buffer. (This may
1283 # write and cut back our buffer.
1439 # First do the raw seek, then empty the read buffer, so that
1457 # Use seek to flush the read buffer.
1845 Read from underlying buffer until we have size characters or we hit EOF.
1869 Separate the underlying buffer from the TextIOBase and return it.
1871 After the underlying buffer has been detached, the TextIO is in an
1988 r"""Character and line based layer over a BufferedIOBase object, buffer.
2019 def __init__(self, buffer, encoding=None, errors=None, newline=None,
2043 self._buffer = buffer
2044 self._decoded_chars = '' # buffer for text returned from decoder
2047 self._seekable = self._telling = self.buffer.seekable()
2048 self._has_read1 = hasattr(self.buffer, 'read1')
2077 position = self.buffer.tell()
2128 def buffer(self):
2180 return self.buffer.readable()
2183 return self.buffer.writable()
2186 self.buffer.flush()
2190 if self.buffer is not None and not self.closed:
2194 self.buffer.close()
2198 return self.buffer.closed
2202 return self.buffer.name
2205 return self.buffer.fileno()
2208 return self.buffer.isatty()
2224 self.buffer.write(b)
2250 """Set the _decoded_chars buffer."""
2255 """Advance into the _decoded_chars buffer."""
2274 """Rewind the _decoded_chars buffer."""
2295 # file where the decoder's input buffer is empty.
2303 input_chunk = self.buffer.read1(self._CHUNK_SIZE)
2305 input_chunk = self.buffer.read(self._CHUNK_SIZE)
2344 position = self.buffer.tell()
2418 # Decoder buffer is empty, so this is a safe start point.
2441 return self.buffer.truncate(pos)
2444 if self.buffer is None:
2445 raise ValueError("buffer is already detached")
2447 buffer = self._buffer
2449 return buffer
2473 # sync the underlying buffer with the current position.
2480 position = self.buffer.seek(0, whence)
2499 self.buffer.seek(start_pos)
2513 input_chunk = self.buffer.read(bytes_to_feed)
2541 decoder.decode(self.buffer.read(), final=True))
2662 """Text I/O implementation using an in-memory buffer.
2690 return decoder.decode(self.buffer.getvalue(), final=True)