public class StringMessage extends Object implements CharSequence, Writable
Useful for delayed serialization of arguments for logging.
Message string will not be constructed until the
| Constructor and Description |
|---|
StringMessage(String pattern,
Object... args)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
char |
charAt(int index) |
MediaType |
getMediaType()
Returns the serialized media type for this resource (e.g.
|
int |
length() |
CharSequence |
subSequence(int start,
int end) |
String |
toString() |
Writer |
writeTo(Writer w)
Serialize this object to the specified writer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitchars, codePointspublic StringMessage(String pattern, Object... args)
pattern - MessageFormat-style pattern.args - Message arguments.public Writer writeTo(Writer w) throws IOException
WritablewriteTo in interface Writablew - The writer to write to.IOException - Thrown by underlying stream.public MediaType getMediaType()
WritablegetMediaType in interface Writablepublic char charAt(int index)
charAt in interface CharSequencepublic int length()
length in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequenceCopyright © 2016–2019 The Apache Software Foundation. All rights reserved.