|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.python.core.io.IOBase
org.python.core.io.TextIOBase
org.python.core.io.UniversalIOWrapper
public class UniversalIOWrapper
A Buffered text stream in universal newlines mode.
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 | |
---|---|
UniversalIOWrapper(BufferedIOBase bufferedIO)
Contruct a UniversalIOWrapper wrapping the given BufferedIOBase. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.python.core.io.TextIOBase |
---|
asInputStream, asOutputStream, close, closed, fileno, flush, isatty, readable, readinto, truncate, writable |
Methods inherited from class org.python.core.io.IOBase |
---|
checkClosed, checkReadable, checkWritable, seek |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UniversalIOWrapper(BufferedIOBase bufferedIO)
bufferedIO
- Method Detail |
---|
public String read(int size)
TextIOBase
read
in class TextIOBase
size
- the number of bytes to read
public String readall()
TextIOBase
readall
in class TextIOBase
public String readline(int size)
TextIOBase
readline
in class TextIOBase
size
- the number of bytes to read
public int write(String buf)
TextIOBase
write
in class TextIOBase
buf
- a String value
public long seek(long pos, int whence)
IOBase
seek
in class TextIOBase
pos
- a long position valuewhence
- an int whence value
public long tell()
IOBase
tell
in class TextIOBase
public PyObject getNewlines()
TextIOBase
getNewlines
in class TextIOBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |