ByteSerializerDeserializer<ByteArrayList>
public class ByteArrayListByteSerializerDeserializer extends java.lang.Object implements ByteSerializerDeserializer<ByteArrayList>
ByteSerializerDeserializer
based on ByteArrayList
.BYTE_ARRAY, INTEGER, VOID
Constructor | Description |
---|---|
ByteArrayListByteSerializerDeserializer() |
Modifier and Type | Method | Description |
---|---|---|
ByteArrayList |
fromStream(java.io.InputStream is) |
A serializer-deserializer for byte arrays that write the array length using variable-length byte encoding,
and the writes the content of the array.
|
void |
skip(FastBufferedInputStream is) |
Skip an object, usually without deserializing it.
|
void |
toStream(ByteArrayList list,
java.io.OutputStream os) |
Serializes an object starting from a given offset of a byte array.
|
public ByteArrayListByteSerializerDeserializer()
public ByteArrayList fromStream(java.io.InputStream is) throws java.io.IOException
fromStream
in interface ByteSerializerDeserializer<ByteArrayList>
is
- the input stream from which the object will be deserialized.java.io.IOException
public void toStream(ByteArrayList list, java.io.OutputStream os) throws java.io.IOException
ByteSerializerDeserializer
toStream
in interface ByteSerializerDeserializer<ByteArrayList>
list
- the object to be serialized.os
- the output stream that will receive the serialized object.java.io.IOException
public void skip(FastBufferedInputStream is) throws java.io.IOException
ByteSerializerDeserializer
Note 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<ByteArrayList>
is
- the fast buffered input stream from which the next object will be skipped.java.io.IOException