001    /**
002     * Implements the Cold Fusion Function tobinary
003     */
004    package railo.runtime.functions.other;
005    
006    import railo.runtime.PageContext;
007    import railo.runtime.exp.PageException;
008    import railo.runtime.ext.function.Function;
009    import railo.runtime.op.Caster;
010    
011    public final class ToBinary implements Function {
012    
013            private static final long serialVersionUID = 4541724601337401920L;
014    
015            public static byte[] call(PageContext pc , Object data) throws PageException {
016                    return Caster.toBinary(data);
017            }
018    }