public class UniversalIOWrapper extends TextIOBase
CHUNK_SIZEDEFAULT_BUFFER_SIZE| Constructor and Description |
|---|
UniversalIOWrapper(BufferedIOBase bufferedIO)
Contruct a UniversalIOWrapper wrapping the given
BufferedIOBase.
|
| Modifier and Type | Method and Description |
|---|---|
PyObject |
getNewlines()
Return the known Newline types, as a PyObject, encountered
while reading this file.
|
String |
read(int size)
Read and return up to size bytes, contained in a String.
|
String |
readall()
Read until EOF.
|
String |
readline(int size)
Read until size, newline or EOF.
|
long |
seek(long pos,
int whence)
Seek to byte offset pos relative to position indicated by whence: 0 Start of stream (the
default). pos should be >= 0; 1 Current position - whence may be negative; 2 End of stream -
whence usually negative.
|
long |
tell()
Return the current stream position.
|
int |
write(String buf)
Write the given String to the IO stream.
|
asInputStream, asOutputStream, close, closed, fileno, flush, isatty, readable, readinto, truncate, writablecheckClosed, checkReadable, checkWritable, seekpublic UniversalIOWrapper(BufferedIOBase bufferedIO)
bufferedIO - public String read(int size)
TextIOBaseread in class TextIOBasesize - the number of bytes to readpublic String readall()
TextIOBasereadall in class TextIOBasepublic String readline(int size)
TextIOBasereadline in class TextIOBasesize - the number of bytes to readpublic int write(String buf)
TextIOBasewrite in class TextIOBasebuf - a String valuepublic long seek(long pos,
int whence)
IOBaseseek in class TextIOBasepos - a long position valuewhence - an int whence valuepublic long tell()
IOBasetell in class TextIOBasepublic PyObject getNewlines()
TextIOBasegetNewlines in class TextIOBase