public abstract class BufferedIOMixin extends BufferedIOBase
DEFAULT_BUFFER_SIZE| Constructor and Description |
|---|
BufferedIOMixin(RawIOBase rawIO)
Initialize this buffer, wrapping the given RawIOBase.
|
BufferedIOMixin(RawIOBase rawIO,
int bufferSize)
Initialize this buffer, wrapping the given RawIOBase.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
asInputStream()
Coerce this into an InputStream if possible, or return null.
|
java.io.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. |
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.
|
buffered, clear, peek, read, read1, readall, readinto, writecheckClosed, checkReadable, checkWritable, seekpublic BufferedIOMixin(RawIOBase rawIO)
rawIO - a RawIOBase to wrappublic BufferedIOMixin(RawIOBase rawIO, int bufferSize)
rawIO - a RawIOBase to wrapbufferSize - the size of the bufferpublic long seek(long pos,
int whence)
IOBasepos relative to position indicated by whence.
whence |
Seek to | pos |
|---|---|---|
| 0 | Start of stream (the default). | Should be ≥0. |
| 1 | Current position + pos | Either sign. |
| 2 | End of stream + pos | Usually ≤0. |
public long tell()
IOBasepublic long truncate(long size)
IOBasepublic void flush()
IOBasepublic void close()
IOBasepublic RawIOBase fileno()
IOBasepublic boolean isatty()
IOBasepublic boolean readable()
IOBasepublic boolean writable()
IOBasepublic boolean closed()
IOBasepublic java.io.InputStream asInputStream()
IOBaseasInputStream in class IOBasepublic java.io.OutputStream asOutputStream()
IOBaseasOutputStream in class IOBase