Package org.python.core.io
Class BinaryIOWrapper
java.lang.Object
org.python.core.io.IOBase
org.python.core.io.TextIOBase
org.python.core.io.BinaryIOWrapper
- Direct Known Subclasses:
TextIOWrapper
A Buffered text stream in binary mode.
- Author:
- Philip Jenvey
-
Field Summary
Fields inherited from class org.python.core.io.TextIOBase
CHUNK_SIZE
Fields inherited from class org.python.core.io.IOBase
DEFAULT_BUFFER_SIZE
-
Constructor Summary
ConstructorDescriptionBinaryIOWrapper
(BufferedIOBase bufferedIO) Contruct a TextIOBase in binary mode, wrapping the given BufferedIOBase. -
Method Summary
Methods inherited from class org.python.core.io.TextIOBase
asInputStream, asOutputStream, close, closed, fileno, flush, getNewlines, isatty, readable, readinto, seek, tell, truncate, writable
Methods inherited from class org.python.core.io.IOBase
checkClosed, checkReadable, checkWritable, seek
-
Constructor Details
-
BinaryIOWrapper
Contruct a TextIOBase in binary mode, wrapping the given BufferedIOBase.- Parameters:
bufferedIO
-
-
-
Method Details
-
read
Description copied from class:TextIOBase
Read and return up to size bytes, contained in a String. Returns an empty String on EOF- Overrides:
read
in classTextIOBase
- Parameters:
size
- the number of bytes to read- Returns:
- a String containing the bytes read
-
readall
Description copied from class:TextIOBase
Read until EOF.- Overrides:
readall
in classTextIOBase
- Returns:
- a String containing the bytes read
-
readline
Description copied from class:TextIOBase
Read until size, newline or EOF. Returns an empty string if EOF is hit immediately.- Overrides:
readline
in classTextIOBase
- Parameters:
size
- the number of bytes to read- Returns:
- a String containing the bytes read
-
write
Description copied from class:TextIOBase
Write the given String to the IO stream. Returns the number of characters written.- Overrides:
write
in classTextIOBase
- Parameters:
buf
- a String value- Returns:
- the number of characters written as an int
-