public class BufferedWriter extends BufferedIOMixin
DEFAULT_BUFFER_SIZE| Constructor and Description |
|---|
BufferedWriter(RawIOBase rawIO,
int bufferSize)
Construct a BufferedWriter of bufferSize, wrapping the given
RawIOBase.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
buffered()
Return true if this objects buffer contains any data.
|
void |
flush()
Flushes write buffers, if applicable.
|
int |
read1(ByteBuffer bytes)
Reads up to bytes.remaining() bytes.
|
boolean |
readable()
Return whether this file was opened for reading.
|
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.
|
int |
write(ByteBuffer bytes)
Write the given ByteBuffer to the IO stream.
|
asInputStream, asOutputStream, close, closed, fileno, isatty, truncate, writableclear, peek, readcheckClosed, checkReadable, checkWritable, seekpublic BufferedWriter(RawIOBase rawIO, int bufferSize)
rawIO - bufferSize - public int write(ByteBuffer bytes)
BufferedIOBasewrite in class BufferedIOBasebytes - a ByteBuffer valuepublic void flush()
IOBaseflush in class BufferedIOMixinpublic long tell()
IOBasetell in class BufferedIOMixinpublic long seek(long pos,
int whence)
IOBaseseek in class BufferedIOMixinpos - a long position valuewhence - an int whence valuepublic boolean buffered()
BufferedIOBasebuffered in class BufferedIOBasepublic ByteBuffer readall()
BufferedIOBasereadall in class BufferedIOBasepublic int readinto(ByteBuffer bytes)
BufferedIOBasereadinto in class BufferedIOBasebytes - a ByteBuffer to read bytes intopublic int read1(ByteBuffer bytes)
BufferedIOBaseread1 in class BufferedIOBasebytes - a ByteBuffer to read bytes intopublic boolean readable()
IOBasereadable in class BufferedIOMixin