Package name.abuchen.portfolio.util

Examples of name.abuchen.portfolio.util.ProgressMonitorInputStream


        {
            // progress monitor
            long bytesTotal = file.length();
            int increment = (int) Math.min(bytesTotal / 20L, Integer.MAX_VALUE);
            monitor.beginTask(MessageFormat.format(Messages.MsgReadingFile, file.getName()), 20);
            input = new ProgressMonitorInputStream(new FileInputStream(file), increment, monitor);

            return buildChain(file, null, password).load(input);
        }
        catch (FileNotFoundException e)
        {
View Full Code Here


            // getting a resource as stream seems to return the total bytes
            long bytesTotalEstimate = input.available();

            int increment = (int) Math.min(bytesTotalEstimate / 20L, Integer.MAX_VALUE);
            monitor.beginTask(Messages.MsgReadingSampleFile, 20);
            InputStream stream = new ProgressMonitorInputStream(input, increment, monitor);
            return buildChain(null, null, null).load(stream);
        }
        finally
        {
            if (input != null)
View Full Code Here

TOP

Related Classes of name.abuchen.portfolio.util.ProgressMonitorInputStream

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.