Examples of LazyFileInputStream


Examples of com.alibaba.otter.node.etl.common.pipe.impl.http.archive.LazyFileInputStream

        }

        boolean result = archiveBean.pack(archiveFile, fileDatas, new ArchiveRetriverCallback<FileData>() {

            public InputStream retrive(FileData source) {
                return new LazyFileInputStream(new File("/tmp/otter/test", source.getPath()));
            }
        });

        if (!result) {
            want.fail();
View Full Code Here

Examples of com.alibaba.otter.node.etl.common.pipe.impl.http.archive.LazyFileInputStream

                    if (StringUtils.isNotEmpty(fileData.getNameSpace())) {
                        throw new RuntimeException(fileData + " is not support!");
                    } else {
                        File source = new File(fileData.getPath());
                        if (source.exists() && source.isFile()) {
                            return new LazyFileInputStream(source);
                        } else {
                            miss = true;
                            return null;
                        }
                    }
View Full Code Here

Examples of org.apache.jackrabbit.core.data.LazyFileInputStream

        return length;
    }

    public InputStream getStream() throws IllegalStateException, RepositoryException {
        try {
            return new LazyFileInputStream(file);
        } catch (FileNotFoundException fnfe) {
            throw new RepositoryException("file backing binary value not found", fnfe);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.data.LazyFileInputStream

    /**
     * {@inheritDoc}
     */
    public InputStream getStream() throws IllegalStateException, RepositoryException {
        try {
            return new LazyFileInputStream(file);
        } catch (FileNotFoundException fnfe) {
            throw new RepositoryException("file backing binary value not found", fnfe);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.data.LazyFileInputStream

        return length;
    }

    public InputStream getStream() throws IllegalStateException, RepositoryException {
        try {
            return new LazyFileInputStream(file);
        } catch (FileNotFoundException fnfe) {
            throw new RepositoryException("file backing binary value not found", fnfe);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.data.LazyFileInputStream

            if (cache.get(fileName) == null) {
                cache.put(fileName, f.length());
            }
        }
        cache.tryPurge();
        return new LazyFileInputStream(f);
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.data.LazyFileInputStream

            if (!f.exists() || isInPurgeMode()) {
                log("purgeMode true or file doesn't exists: getIfStored returned");
                return null;
            }
            f.setLastModified(System.currentTimeMillis());
            return new LazyFileInputStream(f);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.data.LazyFileInputStream

                // f.exists and not in purge mode
                f.setLastModified(System.currentTimeMillis());
                cache.put(fileName, f.length());
            }
            cache.tryPurge();
            return new LazyFileInputStream(f);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.data.LazyFileInputStream

     * @param fileName name of file.
     * @return  stream or null.
     */
    public InputStream getIfStored(String fileName) throws IOException {
        File file = getFileIfStored(fileName);
        return file == null ? null : new LazyFileInputStream(file);
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.data.LazyFileInputStream

            if (cache.get(fileName) == null) {
                cache.put(fileName, f.length());
            }
        }
        cache.tryPurge();
        return new LazyFileInputStream(f);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.