|
|||||||||
| 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.BufferedIOBase
org.python.core.io.BufferedIOMixin
org.python.core.io.BufferedReader
public class BufferedReader
Buffer for a readable sequential RawIO object.
| Field Summary |
|---|
| Fields inherited from class org.python.core.io.IOBase |
|---|
DEFAULT_BUFFER_SIZE |
| Constructor Summary | |
|---|---|
BufferedReader(RawIOBase rawIO,
int bufferSize)
Construct a BufferedReader of bufferSize, wrapping the given RawIOBase. |
|
| Method Summary | |
|---|---|
boolean |
buffered()
Return true if this objects buffer contains any data. |
void |
clear()
Clear the read buffer if one exists. |
ByteBuffer |
peek(int size)
Returns buffered bytes without advancing the position. |
int |
read1(ByteBuffer bytes)
Reads up to bytes.remaining() bytes. |
ByteBuffer |
readall()
Read until EOF. |
int |
readinto(ByteBuffer bytes)
Read up to bytes.remaining() bytes into the given ByteBuffer. |
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. |
boolean |
writable()
Return whether this file was opened for writing. |
int |
write(ByteBuffer bytes)
Write the given ByteBuffer to the IO stream. |
| Methods inherited from class org.python.core.io.BufferedIOMixin |
|---|
asInputStream, asOutputStream, close, closed, fileno, flush, isatty, readable, truncate |
| Methods inherited from class org.python.core.io.BufferedIOBase |
|---|
read |
| 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 BufferedReader(RawIOBase rawIO,
int bufferSize)
rawIO - bufferSize - | Method Detail |
|---|
public int readinto(ByteBuffer bytes)
BufferedIOBase
readinto in class BufferedIOBasebytes - a ByteBuffer to read bytes into
public ByteBuffer readall()
BufferedIOBase
readall in class BufferedIOBasepublic ByteBuffer peek(int size)
BufferedIOBase
peek in class BufferedIOBasesize - the minimal number of bytes as an int
public int read1(ByteBuffer bytes)
BufferedIOBase
read1 in class BufferedIOBasebytes - a ByteBuffer to read bytes into
public long tell()
IOBase
tell in class BufferedIOMixin
public long seek(long pos,
int whence)
IOBase
seek in class BufferedIOMixinpos - a long position valuewhence - an int whence value
public boolean buffered()
BufferedIOBase
buffered in class BufferedIOBasepublic void clear()
BufferedIOBase
clear in class BufferedIOBasepublic int write(ByteBuffer bytes)
BufferedIOBase
write in class BufferedIOBasebytes - a ByteBuffer value
public boolean writable()
IOBase
writable in class BufferedIOMixin
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||