T decode(byte[] bytes) throws CodecException
DecoderClassCastException occurs this decode method will throw a DecoderException.decode 在接口中 Decoder<byte[],T>bytes - the object to decodeCodecException - a decoder exception can be thrown for any number of reasons. Some good candidates are that the
parameter passed to this method is null, a param cannot be cast to the appropriate type for a
specific encoder.byte[] encode(T obj) throws CodecException
Encoderbyte[] or Strings depending on the implementation used.encode 在接口中 Encoder<T,byte[]>obj - An object to encodeCodecException - An encoder exception is thrown if the encoder experiences a failure condition during the encoding
process.Copyright © 2022. All rights reserved.