public void set(int opcode, File file) {
        set(opcode);
        
        int bytes = new Long(file.length()).intValue();
        FileInputStream fi = null;
        try {
            fi = new FileInputStream(file);
            FileChannel chan = fi.getChannel();
            
            data = new byte[bytes];
            ByteBuffer buf = ByteBuffer.wrap(data);
            chan.read(buf);
            
            dataSize = (short)data.length;
            
            chan.close();            
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Message.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Message.class.getName()).log(Level.SEVERE, null, ex);
        }
    }