Package floobits.common.interfaces

Examples of floobits.common.interfaces.IFile


        return context.iFactory.getOrCreateFile(context.absPath(this.path));
    }


    protected IDoc getVirtualDoc() {
        IFile virtualFile = getVirtualFile();
        if (virtualFile == null) {
            Flog.warn("Can't get virtual file to read from disk %s", this);
            return null;
        }
View Full Code Here


        super(path, id, buf, md5, context, outbound);
        this.encoding = Encoding.BASE64;
    }

    synchronized public void read () {
        IFile virtualFile = getVirtualFile();
        if (virtualFile == null) {
            Flog.warn("Couldn't get virtual file in readFromDisk %s", this);
            return;
        }

        final byte[] bytes = virtualFile.getBytes();
        if (bytes == null) {
            Flog.warn("Could not get byte array contents for file %s", this);
            return;
        }
        buf = bytes;
View Full Code Here

            public void run() {
                if (!isPopulated()) {
                    Flog.warn("Unable to write %s because it's not populated yet.", path);
                    return;
                }
                IFile virtualFile = getOrCreateFile();
                if (virtualFile == null) {
                    context.errorMessage("Unable to write file. virtualFile is null.");
                    return;
                }
                FlooHandler flooHandler = context.getFlooHandler();
                if (flooHandler == null) {
                    return;
                }
                synchronized (context) {
                    try {
                        context.setListener(false);
                        if (!virtualFile.setBytes(buf)) {
                            Flog.warn("Writing binary content to disk failed. %s", path);
                        }
                    } finally {
                        context.setListener(true);
                    }
View Full Code Here

TOP

Related Classes of floobits.common.interfaces.IFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.