Package org.apache.jackrabbit.util

Examples of org.apache.jackrabbit.util.TransientFileFactory


        if (isFolder(filePath)) {
            throw new FileSystemException("path denotes folder: " + filePath);
        }

        try {
            TransientFileFactory fileFactory = TransientFileFactory.getInstance();
            final File tmpFile = fileFactory.createTransientFile("bin", null, null);

            return new FilterOutputStream(new FileOutputStream(tmpFile)) {

                public void close() throws IOException {
                    super.close();
View Full Code Here


        if (isFolder(filePath)) {
            throw new FileSystemException("path denotes folder: " + filePath);
        }

        try {
            TransientFileFactory fileFactory = TransientFileFactory.getInstance();
            final File tmpFile = fileFactory.createTransientFile("bin", null, null);

            // @todo FIXME use java.sql.Blob

            if (isFile(filePath)) {
                // file entry exists, spool contents to temp file first
View Full Code Here

            throws IOException {
        if (buffer != null) {
            if (bufferPos + length > MAX_BUFFER_SIZE) {
                // threshold for keeping data in memory exceeded;
                // create temp file and spool buffer contents
                TransientFileFactory fileFactory = TransientFileFactory.getInstance();
                tmpFile = fileFactory.createTransientFile("txt", null, null);
                final FileOutputStream fout = new FileOutputStream(tmpFile);
                writer = new OutputStreamWriter(fout) {
                    public void flush() throws IOException {
                        // flush this writer
                        super.flush();
View Full Code Here

                    //baos.close();
                    return InternalValue.create(baos.toByteArray());
                } else {
                    // >= 65kb: deserialize BINARY type
                    // using Reader and temporay file
                    TransientFileFactory fileFactory = TransientFileFactory.getInstance();
                    File tmpFile = fileFactory.createTransientFile("bin", null, null);
                    FileOutputStream out = new FileOutputStream(tmpFile);
                    Reader reader = reader();
                    try {
                        Base64.decode(reader, out);
                    } finally {
View Full Code Here

        if (isFolder(filePath)) {
            throw new FileSystemException("path denotes folder: " + filePath);
        }

        try {
            TransientFileFactory fileFactory = TransientFileFactory.getInstance();
            final File tmpFile = fileFactory.createTransientFile("bin", null, null);

            return new FilterOutputStream(new FileOutputStream(tmpFile)) {

                public void close() throws IOException {
                    super.close();
View Full Code Here

        if (isFolder(filePath)) {
            throw new FileSystemException("path denotes folder: " + filePath);
        }

        try {
            TransientFileFactory fileFactory = TransientFileFactory.getInstance();
            final File tmpFile = fileFactory.createTransientFile("bin", null, null);

            // @todo FIXME use java.sql.Blob

            if (isFile(filePath)) {
                // file entry exists, spool contents to temp file first
View Full Code Here

                    out.write(spoolBuffer, 0, read);
                    len += read;
                } else if (len + read > MAX_BUFFER_SIZE) {
                    // threshold for keeping data in memory exceeded;
                    // create temp file and spool buffer contents
                    TransientFileFactory fileFactory = TransientFileFactory.getInstance();
                    spoolFile = fileFactory.createTransientFile("bin", null, null);
                    out = new FileOutputStream(spoolFile);
                    out.write(buffer, 0, len);
                    out.write(spoolBuffer, 0, read);
                    buffer = null;
                    len += read;
View Full Code Here

            // base64 encoded binary value;
            // the encodeBlanks flag can be ignored since base64-encoded
            // data cannot contain encoded space characters

            // decode to temp file
            TransientFileFactory fileFactory = TransientFileFactory.getInstance();
            final File tmpFile = fileFactory.createTransientFile("bin", null, null);
            FileOutputStream out = new FileOutputStream(tmpFile);
            try {
                Base64.decode(reader, out);
            } finally {
                out.close();
View Full Code Here

                        //baos.close();
                        iv = session.getQValueFactory().create(baos.toByteArray());
                    } else {
                        // >= 65kb: deserialize BINARY type
                        // using Reader and temporay file
                        TransientFileFactory fileFactory = TransientFileFactory.getInstance();
                        File tmpFile = fileFactory.createTransientFile("bin", null, null);
                        FileOutputStream out = new FileOutputStream(tmpFile);
                        Reader reader = tv.reader();
                        try {
                            Base64.decode(reader, out);
                        } finally {
View Full Code Here

            // base64 encoded binary value;
            // the encodeBlanks flag can be ignored since base64-encoded
            // data cannot contain encoded space characters

            // decode to temp file
            TransientFileFactory fileFactory = TransientFileFactory.getInstance();
            final File tmpFile = fileFactory.createTransientFile("bin", null, null);
            OutputStream out = new BufferedOutputStream(new FileOutputStream(tmpFile));
            try {
                Base64.decode(reader, out);
            } finally {
                out.close();
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.util.TransientFileFactory

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.