|
|||||||||
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
public abstract class BufferedIOBase
Base class for buffered I/O objects.
Field Summary |
---|
Fields inherited from class org.python.core.io.IOBase |
---|
DEFAULT_BUFFER_SIZE |
Constructor Summary | |
---|---|
BufferedIOBase()
|
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. |
ByteBuffer |
read(int size)
Read and return up to size bytes, contained in a ByteBuffer. |
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. |
int |
write(ByteBuffer bytes)
Write the given ByteBuffer to the IO stream. |
Methods inherited from class org.python.core.io.IOBase |
---|
asInputStream, asOutputStream, checkClosed, checkReadable, checkWritable, close, closed, fileno, flush, isatty, readable, seek, seek, tell, truncate, writable |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BufferedIOBase()
Method Detail |
---|
public ByteBuffer read(int size)
size
- the number of bytes to read
public ByteBuffer readall()
public int readinto(ByteBuffer bytes)
bytes
- a ByteBuffer to read bytes into
public int write(ByteBuffer bytes)
bytes
- a ByteBuffer value
public ByteBuffer peek(int size)
size
- the minimal number of bytes as an int
public int read1(ByteBuffer bytes)
bytes
- a ByteBuffer to read bytes into
public boolean buffered()
public void clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |