core/src/in/srain/cube/diskcache/CacheEntry.java
public OutputStream newOutputStream() throws IOException {
        synchronized (mDiskCache) {
            if (mIsUnderEdit) {
                throw new IOException("This file has been under edit");
            }
            mIsUnderEdit = true;
            File tempFile = getTempFile();
            File parent = tempFile.getParentFile();
            if (!parent.exists() && !parent.mkdirs()) {
                throw new IOException("Can not make sure the parent directory exist.");
            }
            return new FaultHidingOutputStream(new FileOutputStream(tempFile));
        }
    }
public OutputStream newOutputStream() throws IOException {
        synchronized (mDiskCache) {
            if (mIsUnderEdit) {
                throw new IOException("This file has been under edit");
            }
            mIsUnderEdit = true;
            File tempFile = getTempFile();
            File parent = tempFile.getParentFile();
            if (!parent.exists() && !parent.mkdirs()) {
                throw new IOException("Can not make sure the parent directory exist.");
            }
            return new FaultHidingOutputStream(new FileOutputStream(tempFile));
        }
    }
Returns a new unbuffered output stream to write the value
If the underlying output stream encounters errors
when writing to the filesystem, this edit will be aborted when
{@link #commit} is called. The returned output stream does not throw
IOExceptions.