ByteSerializerDeserializer<java.lang.CharSequence>public class CharSequenceByteSerializerDeserializer extends java.lang.Object implements ByteSerializerDeserializer<java.lang.CharSequence>
ByteSerializerDeserializer. Not a very efficient one; it is intended only as an example of how a class of this kind works.BYTE_ARRAY, INTEGER, VOID| Modifier | Constructor | Description |
|---|---|---|
protected |
CharSequenceByteSerializerDeserializer() |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.CharSequence |
fromStream(java.io.InputStream is) |
Deserializes an object starting from a given portion of a byte array.
|
static CharSequenceByteSerializerDeserializer |
getInstance() |
|
void |
skip(FastBufferedInputStream is) |
Skip an object, usually without deserializing it.
|
void |
toStream(java.lang.CharSequence src,
java.io.OutputStream os) |
Serializes an object starting from a given offset of a byte array.
|
protected CharSequenceByteSerializerDeserializer()
public static CharSequenceByteSerializerDeserializer getInstance()
public void toStream(java.lang.CharSequence src,
java.io.OutputStream os)
throws java.io.IOException
ByteSerializerDeserializertoStream in interface ByteSerializerDeserializer<java.lang.CharSequence>src - the object to be serialized.os - the output stream that will receive the serialized object.java.io.IOExceptionpublic java.lang.CharSequence fromStream(java.io.InputStream is)
throws java.io.IOException
ByteSerializerDeserializerfromStream in interface ByteSerializerDeserializer<java.lang.CharSequence>is - the input stream from which the object will be deserialized.java.io.IOExceptionpublic void skip(FastBufferedInputStream is) throws java.io.IOException
ByteSerializerDeserializerNote that this method
requires explicitly a FastBufferedInputStream. As
a result, you can safely use skip() to
skip the number of bytes required (see the documentation of FastBufferedInputStream.skip(long)
for some elaboration).
Calling this method must be equivalent to calling ByteSerializerDeserializer.fromStream(InputStream)
and discarding the result.
skip in interface ByteSerializerDeserializer<java.lang.CharSequence>is - the fast buffered input stream from which the next object will be skipped.java.io.IOException