001    package railo.runtime.query.caster;
002    
003    import java.io.IOException;
004    import java.sql.ResultSet;
005    import java.sql.SQLException;
006    import java.util.TimeZone;
007    
008    import railo.runtime.op.Caster;
009    import railo.runtime.op.Constants;
010    
011    public class BitCast implements Cast {
012    
013            @Override
014            public Object toCFType(TimeZone tz,int type, ResultSet rst, int columnIndex) throws SQLException, IOException {
015                    Object o=rst.getObject(columnIndex);
016                    if(o==null)return null;
017                    return Caster.toDouble(o,Constants.DOUBLE_ZERO);
018            }
019    
020    }