public class UniversalIOWrapper extends TextIOBase
DEFAULT_BUFFER_SIZE
CHUNK_SIZE
Constructor | Description |
---|---|
UniversalIOWrapper(BufferedIOBase bufferedIO) |
Contruct a UniversalIOWrapper wrapping the given
BufferedIOBase.
|
Modifier and Type | Method | Description |
---|---|---|
PyObject |
getNewlines() |
Return the known Newline types, as a PyObject, encountered
while reading this file.
|
java.lang.String |
read(int size) |
Read and return up to size bytes, contained in a String.
|
java.lang.String |
readall() |
Read until EOF.
|
java.lang.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(java.lang.String buf) |
Write the given String to the IO stream.
|
checkClosed, checkReadable, checkWritable, seek
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asInputStream, asOutputStream, close, closed, fileno, flush, isatty, readable, readinto, truncate, writable
public UniversalIOWrapper(BufferedIOBase bufferedIO)
bufferedIO
- public java.lang.String read(int size)
TextIOBase
read
in class TextIOBase
size
- the number of bytes to readpublic java.lang.String readall()
TextIOBase
readall
in class TextIOBase
public java.lang.String readline(int size)
TextIOBase
readline
in class TextIOBase
size
- the number of bytes to readpublic int write(java.lang.String buf)
TextIOBase
write
in class TextIOBase
buf
- a String valuepublic long seek(long pos, int whence)
IOBase
seek
in class TextIOBase
pos
- a long position valuewhence
- an int whence valuepublic long tell()
IOBase
tell
in class TextIOBase
public PyObject getNewlines()
TextIOBase
getNewlines
in class TextIOBase