| Modifier and Type | Field and Description |
|---|---|
| protected int | bufferSize
The size of the buffer |
| protected RawIOBase | rawIO
The underlying raw io stream |
| Access | Constructor and Description |
|---|---|
| public | BufferedIOMixin(RawIOBase
a RawIOBase to wrap rawIO)Initialize this buffer, wrapping the given RawIOBase. |
| public | BufferedIOMixin(RawIOBase
a RawIOBase to wrap rawIO, int the size of the buffer bufferSize)Initialize this buffer, wrapping the given RawIOBase. |
| Modifier and Type | Method and Description |
|---|---|
| public InputStream | asInputStream()
Overrides org. Coerce this into an InputStream if possible, or return null. |
| public OutputStream | asOutputStream()
Overrides org. Coerce this into an OutputStream if possible, or return null. |
| public void | |
| public boolean | |
| public RawIOBase | fileno()
Overrides org. Returns underlying file descriptor if one exists. |
| public void | |
| public boolean | isatty()
Overrides org. Returns whether this is an 'interactive' stream. |
| public boolean | readable()
Overrides org. Return whether this file was opened for reading. |
| public long | seek(long
a long position value pos, int an int whence value whence)Overrides org. Seek to byte offset |
| public long | |
| public long | truncate(long
a long size to truncate to size)Overrides org. Truncate file to size in bytes. |
| public boolean | writable()
Overrides org. Return whether this file was opened for writing. |
| bufferSize | back to summary |
|---|---|
| protected int bufferSize The size of the buffer | |
| rawIO | back to summary |
|---|---|
| protected RawIOBase rawIO The underlying raw io stream | |
| BufferedIOMixin | back to summary |
|---|---|
| public BufferedIOMixin(RawIOBase rawIO) Initialize this buffer, wrapping the given RawIOBase.
| |
| BufferedIOMixin | back to summary |
|---|---|
| public BufferedIOMixin(RawIOBase rawIO, int bufferSize) Initialize this buffer, wrapping the given RawIOBase.
| |
| asInputStream | back to summary |
|---|---|
| public InputStream asInputStream() Overrides org. Doc from org. Coerce this into an InputStream if possible, or return null.
| |
| asOutputStream | back to summary |
|---|---|
| public OutputStream asOutputStream() Overrides org. Doc from org. Coerce this into an OutputStream if possible, or return null.
| |
| close | back to summary |
|---|---|
| public void close() Overrides org. Doc from org. Flushes and closes the IO object. This must be idempotent. It should also set a flag for the 'closed' property (see below) to test.
| |
| closed | back to summary |
|---|---|
| public boolean closed() Overrides org. Doc from org. Return whether this file has been closed.
| |
| fileno | back to summary |
|---|---|
| public RawIOBase fileno() Overrides org. Doc from org. Returns underlying file descriptor if one exists. Raises IOError if the IO object does not use a file descriptor. | |
| flush | back to summary |
|---|---|
| public void flush() Overrides org. Doc from org. Flushes write buffers, if applicable. This is a no-op for read-only and non-blocking streams.
| |
| isatty | back to summary |
|---|---|
| public boolean isatty() Overrides org. Doc from org. Returns whether this is an 'interactive' stream. Returns False if we don't know.
| |
| readable | back to summary |
|---|---|
| public boolean readable() Overrides org. Doc from org. Return whether this file was opened for reading.
| |
| seek | back to summary | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public long seek(long pos, int whence) Overrides org. Doc from org. Seek to byte offset
a long position value seeked to | |||||||||||||
| tell | back to summary |
|---|---|
| public long tell() Overrides org. Doc from org. Return the current stream position.
| |
| truncate | back to summary |
|---|---|
| public long truncate(long size) Overrides org. Doc from org. Truncate file to size in bytes. Returns the new size.
| |
| writable | back to summary |
|---|---|
| public boolean writable() Overrides org. Doc from org. Return whether this file was opened for writing.
| |