class MySQLStringBinlogProtocolValue implements MySQLBinlogProtocolValue {

    @Override
    public Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload) {
        switch (MySQLColumnType.valueOf(columnDef.getColumnMeta() >> 8)) {
            case MYSQL_TYPE_ENUM:
                return readEnumValue(columnDef.getColumnMeta() & 0xff, payload);
            case MYSQL_TYPE_SET:
                return payload.getByteBuf().readByte();
            case MYSQL_TYPE_STRING:
                return payload.readStringFix(payload.getByteBuf().readUnsignedByte());
            default:
                throw new UnsupportedOperationException("");
        }
    }

}