public class StringObject extends Object implements CharSequence, Writable
Useful in certain conditions such as logging when you don't want to needlessly serialize objects.
Instances of this method are created by the WriterSerializer.toStringObject(Object) method.
| Constructor and Description |
|---|
StringObject(Object o)
Constructor with default serializer
SimpleJsonSerializer.DEFAULT |
StringObject(WriterSerializer s,
Object o)
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 StringObject(WriterSerializer s, Object o)
s - The serializer to use to serialize the object.o - The object to be serialized.public StringObject(Object o)
SimpleJsonSerializer.DEFAULTo - The object to be serialized.public String toString()
toString in interface CharSequencetoString in class Objectpublic int length()
length in interface CharSequencepublic char charAt(int index)
charAt in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequencepublic Writer writeTo(Writer w) throws IOException
WritablewriteTo in interface Writablew - The writer to write to.IOExceptionpublic MediaType getMediaType()
WritablegetMediaType in interface WritableCopyright © 2018 Apache. All rights reserved.