public class StringPortability extends Object implements PersistentPortability<String>
| Modifier and Type | Field and Description |
|---|---|
static StringPortability |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
void |
bootstrap(ObjectInput input) |
void |
close() |
String |
decode(ByteBuffer buffer)
Decodes a
ByteBuffer to an object of type T. |
ByteBuffer |
encode(String object)
Encodes an object of type
T as a ByteBuffer. |
boolean |
equals(Object value,
ByteBuffer readBuffer)
Returns true if the encoded object once decoded would be
Object.equals(Object) to the supplied object. |
void |
flush() |
void |
persist(ObjectOutput output) |
public static final StringPortability INSTANCE
public ByteBuffer encode(String object)
PortabilityT as a ByteBuffer.encode in interface Portability<String>object - object to be encodedpublic String decode(ByteBuffer buffer)
PortabilityByteBuffer to an object of type T.decode in interface Portability<String>buffer - bytes to decodepublic boolean equals(Object value, ByteBuffer readBuffer)
PortabilityObject.equals(Object) to the supplied object.equals in interface Portability<String>value - object to compare toreadBuffer - buffer containing encoded objecttrue if the two parameters are "equal"public void flush()
throws IOException
flush in interface PersistentIOExceptionpublic void close()
throws IOException
close in interface PersistentIOExceptionpublic void persist(ObjectOutput output) throws IOException
persist in interface PersistentIOExceptionpublic void bootstrap(ObjectInput input) throws IOException
bootstrap in interface PersistentIOExceptionCopyright © 2015–2024. All rights reserved.