Package io.fathom.cloud.blobs

Examples of io.fathom.cloud.blobs.TempFile


            // We can unfreeze the VM now
            freezer.setFrozen(false);

            // TODO: Support side-load

            TempFile snapshotFile = snapshot.copyToFile();
            return snapshotFile;
        } finally {
            if (freezer.isFrozen()) {
                freezer.setFrozen(false);
            }
View Full Code Here


    @Override
    public void enqueue(byte[] data) throws IOException {
        String name = System.currentTimeMillis() + "_" + UUID.randomUUID().toString();

        try (TempFile tempFile = new TempFile(new File(tmpDir, name))) {
            Files.write(data, tempFile.getFile());

            tempFile.renameTo(new File(queueDir, name));
        }
    }
View Full Code Here

            try (InputStream is = response.getInputStream()) {
                if (is == null) {
                    return null;
                }

                TempFile tempFile = TempFile.create();
                try {
                    try (FileOutputStream os = new FileOutputStream(tempFile.getFile())) {
                        ByteStreams.copy(is, os);
                    }

                    TempFile ret = tempFile;
                    tempFile = null;
                    return ret;
                } finally {
                    if (tempFile != null) {
                        tempFile.close();
View Full Code Here

TOP

Related Classes of io.fathom.cloud.blobs.TempFile

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.