public class LimitAppendable extends Object implements Appendable
Appendable
that limits the amount of text that can be appended.Modifier and Type | Method and Description |
---|---|
Appendable |
append(char c) |
Appendable |
append(CharSequence csq) |
Appendable |
append(CharSequence csq,
int start,
int end) |
boolean |
limitExceeded()
Returns whether or not the limit has been exceeded.
|
boolean |
limitReached()
Returns whether or not the limit has been reached.
|
public boolean limitReached()
true
if the limit has been reached, or false
otherwise.public boolean limitExceeded()
limitReached()
is that this method will
return false
if the total length that was appended exactly matches the limit, and limitReached()
will return true
.true
if the limit has been exceeded, or false
otherwise.public Appendable append(CharSequence csq) throws IOException
append
in interface Appendable
IOException
public Appendable append(CharSequence csq, int start, int end) throws IOException
append
in interface Appendable
IOException
public Appendable append(char c) throws IOException
append
in interface Appendable
IOException
Copyright © 2020–2023. All rights reserved.