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 intprivate 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) intcapacity()charcharAt(int index) voidclose()voidflush()(package private) intindexOf(CharSequence seq) intlength()(package private) intposition()(package private) voidposition(int index) subSequence(int startIndex, int endIndex) toString()(package private) booleanvoidwrite(char[] source) voidwrite(char[] source, int offset, int length) voidwrite(int c) voidvoidMethods inherited from class java.io.Writer
nullWriterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
appendin interfaceAppendable- Overrides:
appendin classWriter
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter
-
indexOf
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
flush
public void flush() -
close
public void close() -
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-