class FSTMessageCodec implements MessageCodec {
    private final FastThreadLocal<FSTConfiguration> configuration;

    public FSTMessageCodec(Supplier<FSTConfiguration> supplier) {

        this(new FastThreadLocal<FSTConfiguration>() {
            @Override
            protected FSTConfiguration initialValue() {
                return supplier.get();
            }
        });
    }

    @Override
    public Message deserialize(InputStream stream) throws Exception {<FILL_FUNCTION_BODY>}

    @Override
    public void serialize(Message message, OutputStream stream) throws Exception {
        try (FSTObjectOutput output = configuration.get().getObjectOutput(stream)) {
            message.writeExternal(output);
        }
    }
}

        Message message = Message.builder().build();
        try (FSTObjectInput input = configuration.get().getObjectInput(stream)) {
            message.readExternal(input);
        }
        return message;
    
<no_super_class>