|
|||||||||
| 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
public abstract class BufferedIOMixin
A mixin implementation of BufferedIOBase with an underlying raw stream. This passes most requests on to the underlying raw stream. It does *not* provide implementations of read(), readinto() or write().
| Field Summary |
|---|
| Fields inherited from class org.python.core.io.IOBase |
|---|
DEFAULT_BUFFER_SIZE |
| Constructor Summary | |
|---|---|
BufferedIOMixin(RawIOBase rawIO)
Initialize this buffer, wrapping the given RawIOBase. |
|
BufferedIOMixin(RawIOBase rawIO,
int bufferSize)
Initialize this buffer, wrapping the given RawIOBase. |
|
| Method Summary | |
|---|---|
InputStream |
asInputStream()
Coerce this into an InputStream if possible, or return null. |
OutputStream |
asOutputStream()
Coerce this into an OutputStream if possible, or return null. |
void |
close()
Flushes and closes the IO object. |
boolean |
closed()
Return whether this file has been closed. |
RawIOBase |
fileno()
Returns underlying file descriptor if one exists. |
void |
flush()
Flushes write buffers, if applicable. |
boolean |
isatty()
Returns whether this is an 'interactive' stream. |
boolean |
readable()
Return whether this file was opened for reading. |
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. |
long |
truncate(long size)
Truncate file to size in bytes. |
boolean |
writable()
Return whether this file was opened for writing. |
| Methods inherited from class org.python.core.io.BufferedIOBase |
|---|
buffered, clear, peek, read, read1, readall, readinto, write |
| 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 BufferedIOMixin(RawIOBase rawIO)
rawIO - a RawIOBase to wrap
public BufferedIOMixin(RawIOBase rawIO,
int bufferSize)
rawIO - a RawIOBase to wrapbufferSize - the size of the buffer| Method Detail |
|---|
public long seek(long pos,
int whence)
IOBase
seek in class IOBasepos - a long position valuewhence - an int whence value
public long tell()
IOBase
tell in class IOBasepublic long truncate(long size)
IOBase
truncate in class IOBasesize - a long size to truncate to
public void flush()
IOBase
flush in class IOBasepublic void close()
IOBase
close in class IOBasepublic RawIOBase fileno()
IOBase
fileno in class IOBasepublic boolean isatty()
IOBase
isatty in class IOBasepublic boolean readable()
IOBase
readable in class IOBasepublic boolean writable()
IOBase
writable in class IOBasepublic boolean closed()
IOBase
closed in class IOBasepublic InputStream asInputStream()
IOBase
asInputStream in class IOBasepublic OutputStream asOutputStream()
IOBase
asOutputStream in class IOBase
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||