com.mysql.cj.protocol

## Interface ValueEncoder

    public interface ValueEncoder

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `encodeAsBinary(Message msg, BindValue binding)`
`void` `encodeAsQueryAttribute(Message msg, BindValue binding)`
`void` `encodeAsText(Message msg, BindValue binding)`
`long` `getBinaryLength(BindValue binding)`
`byte[]` `getBytes(BindValue binding)`
`String` `getString(BindValue binding)`
`long` `getTextLength(BindValue binding)`
`void` `init(PropertySet pset, ServerSession serverSession, ExceptionInterceptor exceptionInterceptor)`

### Method Detail

#### init

    void init(PropertySet pset,
              ServerSession serverSession,
              ExceptionInterceptor exceptionInterceptor)

#### getBytes

    byte[] getBytes(BindValue binding)

#### getString

    String getString(BindValue binding)

#### getTextLength

    long getTextLength(BindValue binding)

#### getBinaryLength

    long getBinaryLength(BindValue binding)

#### encodeAsText

    void encodeAsText(Message msg,
                      BindValue binding)

#### encodeAsBinary

    void encodeAsBinary(Message msg,
                        BindValue binding)

#### encodeAsQueryAttribute

    void encodeAsQueryAttribute(Message msg,
                                BindValue binding)

Copyright © 2016, 2026, Oracle and/or its affiliates.