public static class CompatibleFieldSerializer.CompatibleFieldSerializerConfig extends FieldSerializer.FieldSerializerConfig
Constructor and Description |
---|
CompatibleFieldSerializerConfig() |
Modifier and Type | Method and Description |
---|---|
CompatibleFieldSerializer.CompatibleFieldSerializerConfig |
clone() |
boolean |
getChunkedEncoding() |
int |
getChunkSize() |
boolean |
getReadUnknownTagData() |
void |
setChunkedEncoding(boolean chunked)
When true, fields are written with chunked encoding to allow unknown field data to be skipped.
|
void |
setChunkSize(int chunkSize)
The maximum size of each chunk for chunked encoding.
|
void |
setReadUnknownFieldData(boolean readUnknownTagData)
When false and encountering an unknown field, an exception is thrown or, if
chunked
encoding is enabled, the data is skipped. |
getCopyTransient, getExtendedFieldNames, getFieldsCanBeNull, getFixedFieldTypes, getIgnoreSyntheticFields, getSerializeTransient, getSetFieldsAsAccessible, getVariableLengthEncoding, setCopyTransient, setExtendedFieldNames, setFieldsAsAccessible, setFieldsCanBeNull, setFixedFieldTypes, setIgnoreSyntheticFields, setSerializeTransient, setVariableLengthEncoding
public CompatibleFieldSerializer.CompatibleFieldSerializerConfig clone()
clone
in class FieldSerializer.FieldSerializerConfig
public void setReadUnknownFieldData(boolean readUnknownTagData)
chunked
encoding
is enabled, the data is skipped.
When true, the type of each field value is written before the value. When an unknown field is encountered, an attempt to
read the data is made so if it is a reference then any other values in the object graph referencing that data can be
deserialized. If reading the data fails (eg the class is unknown or has been removed) then an exception is thrown or, if
chunked encoding
is enabled, the data is skipped.
In either case, if the data is skipped and references
are enabled, then any
references in the skipped data are not read and further deserialization receive the wrong references and fail.
Default is true.
public boolean getReadUnknownTagData()
public void setChunkedEncoding(boolean chunked)
setReadUnknownFieldData(boolean)
public boolean getChunkedEncoding()
public void setChunkSize(int chunkSize)
public int getChunkSize()
Copyright © 2019. All Rights Reserved.