public void touchFile(Message msg) throws IOException {
        File f = new File(this.path + msg.fileRelativePath);
        BufferedOutputStream bos = null;
        byte b[] = new byte[1024];
        int readn = 0, n = -1, lindex = -1;
        long fileLength = msg.fileSize;
        String dirp = "";
        
        lindex = msg.fileRelativePath.lastIndexOf(File.separator);
        if (lindex != -1) {
            dirp = msg.fileRelativePath.substring(0, lindex);
        }
            
        File fdir = new File(this.path + dirp);
        if (!fdir.isDirectory()) {
            fdir.mkdirs();
        }
        f.createNewFile();
            
        if (fileLength == 0) {
            return;
        }
            
        bos = new BufferedOutputStream(new FileOutputStream(f));
        if (ois == null) {
            ois = new ObjectInputStream(this.net.getReadStream());
        }

        for (;;) {
            n = ois.read(b);
            if (n == -1) {
                break;
            }
            bos.write(b, 0, n);
            readn += n;
            if (readn == fileLength) {
                break;
            }
        }
        bos.close();  
    }