class MySQLTime2BinlogProtocolValue implements MySQLBinlogProtocolValue {

    @Override
    public Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload) {
        int time = payload.getByteBuf().readUnsignedMedium();
        if (0x800000 == time) {
            return MySQLTimeValueUtil.ZERO_OF_TIME;
        }
        MySQLFractionalSeconds fractionalSeconds = new MySQLFractionalSeconds(columnDef.getColumnMeta(), payload);
        return String.format("%02d:%02d:%02d%s", (time >> 12) % (1 << 10), (time >> 6) % (1 << 6), time % (1 << 6), fractionalSeconds);
    }

}