Class TruncatingBufferedWriter
java.lang.Object
java.io.Writer
org.apache.logging.log4j.layout.template.json.util.TruncatingBufferedWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
,CharSequence
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final char[]
private int
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend
(char c) append
(CharSequence seq) append
(CharSequence seq, int start, int end) (package private) char[]
buffer()
(package private) int
capacity()
char
charAt
(int index) void
close()
void
flush()
(package private) int
indexOf
(CharSequence seq) int
length()
(package private) int
position()
(package private) void
position
(int index) subSequence
(int startIndex, int endIndex) toString()
(package private) boolean
void
write
(char[] source) void
write
(char[] source, int offset, int length) void
write
(int c) void
void
Methods inherited from class java.io.Writer
nullWriter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Field Details
-
buffer
private final char[] buffer -
position
private int position -
truncated
private boolean truncated
-
-
Constructor Details
-
TruncatingBufferedWriter
TruncatingBufferedWriter(int capacity)
-
-
Method Details
-
buffer
char[] buffer() -
position
int position() -
position
void position(int index) -
capacity
int capacity() -
truncated
boolean truncated() -
write
public void write(int c) -
write
public void write(char[] source) -
write
public void write(char[] source, int offset, int length) -
write
-
write
-
append
- Specified by:
append
in interfaceAppendable
- Overrides:
append
in classWriter
-
append
- Specified by:
append
in interfaceAppendable
- Overrides:
append
in classWriter
-
append
- Specified by:
append
in interfaceAppendable
- Overrides:
append
in classWriter
-
indexOf
-
length
public int length()- Specified by:
length
in interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAt
in interfaceCharSequence
-
subSequence
- Specified by:
subSequence
in interfaceCharSequence
-
flush
public void flush() -
close
public void close() -
toString
- Specified by:
toString
in interfaceCharSequence
- Overrides:
toString
in classObject
-