public class ByteStringWriter extends Writer
| Constructor and Description |
|---|
ByteStringWriter(ByteStringAppender out)
Constructs a new ByteStringWriter with the provided ByteStringAppender.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull Writer |
append(char c)
Appends a single character.
|
@NotNull Writer |
append(@NotNull CharSequence csq)
Appends a character sequence.
|
@NotNull Writer |
append(@NotNull CharSequence csq,
int start,
int end)
Appends a portion of a character sequence.
|
void |
close()
Closes the writer, flushing it first.
|
void |
flush()
Flushes the stream.
|
void |
write(char[] cbuf,
int off,
int len)
Writes a portion of an array of characters.
|
void |
write(int c)
Writes a single character.
|
void |
write(@NotNull String str)
Writes a string.
|
void |
write(@NotNull String str,
int off,
int len)
Writes a portion of a string.
|
public ByteStringWriter(ByteStringAppender out)
out - The ByteStringAppender to be used.net.openhft.chronicle.core.io.ClosedIllegalStateException - if the input ByteStringAppender is released.public void write(int c)
throws IOException
write in class Writerc - int specifying a character to be written.IOException - if an I/O error occurs.public void write(@NotNull
@NotNull String str)
throws IOException
write in class Writerstr - String to be written.IOException - if an I/O error occurs.net.openhft.chronicle.core.io.ClosedIllegalStateException - if the input ByteStringAppender is released.public void write(@NotNull
@NotNull String str,
int off,
int len)
throws IOException
write in class Writerstr - String to be written.off - Offset from which to start reading characters.len - Number of characters to be written.IOException - if an I/O error occurs.net.openhft.chronicle.core.io.ClosedIllegalStateException - if the input ByteStringAppender is released.@NotNull public @NotNull Writer append(@NotNull @NotNull CharSequence csq) throws IOException
append in interface Appendableappend in class Writercsq - The character sequence to append.IOException - if an I/O error occurs.net.openhft.chronicle.core.io.ClosedIllegalStateException - if the input ByteStringAppender is released.@NotNull public @NotNull Writer append(@NotNull @NotNull CharSequence csq, int start, int end)
append in interface Appendableappend in class Writercsq - The character sequence to append.start - The index of the first character to append.end - The index of the character following the last character to append.net.openhft.chronicle.core.io.ClosedIllegalStateException - if the input ByteStringAppender is released.@NotNull public @NotNull Writer append(char c)
append in interface Appendableappend in class Writerc - The character to append.net.openhft.chronicle.core.io.ClosedIllegalStateException - if the input ByteStringAppender is released.public void flush()
public void close()
public void write(char[] cbuf,
int off,
int len)
throws IOException
write in class Writercbuf - Array of characters.off - Offset from which to start reading characters.len - Number of characters to be written.IOException - if an I/O error occurs.net.openhft.chronicle.core.io.ClosedIllegalStateException - if the input ByteStringAppender is released.Copyright © 2023. All rights reserved.