class MySQLStringLenencBinaryProtocolValue implements MySQLBinaryProtocolValue {

    @Override
    public void write(final MySQLPacketPayload payload, final Object value) {
        if (value instanceof byte[]) {
            payload.writeBytesLenenc((byte[]) value);
        } else {
            payload.writeStringLenenc(value.toString());
        }
    }

}