Java 8 ProgressMonitorInputStream - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ProgressMonitorInputStream class.

This code example shows how to use the following methods:
			return null ; 
		Frame owner = null;
		if (parentComponent == null) 
			owner = SwingUtils.tryFindSuitableFrameOwner () ;
		InputStream in = new BufferedInputStream(
				new ProgressMonitorInputStream(
						(parentComponent == null) ? (owner) : (parentComponent),
						message, input));
		return in;
	} 
	 
	 
	public static void saveInputStreamInFile (InputStream input, File target, boolean closeInputStream) throws IOException
	{ 
		if (input == null || target == null)
			throw new AssertionError () ;
		FileOutputStream output = new FileOutputStream(target);
		try 
		{ 
			IOUtils.copyLarge(input, output);
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
    public static <O> O load(String filename, Component parentComponent, String message) throws IOException, ClassNotFoundException {
        final FileInputStream fis = new FileInputStream(filename);
        final ObjectInputStream in;
         
        if(parentComponent!=null){
            final ProgressMonitorInputStream pm = new ProgressMonitorInputStream(parentComponent, message, fis);
            in = new ObjectInputStream(pm);
        } 
        else{ 
            in = new ObjectInputStream(fis);
        } 
         
        O r = (O) in.readObject();
        in.close();
        fis.close();
        return r;
    } 
 
    public static boolean exists(String filename) {
        return new File(filename).exists();
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 ProgressMonitorInputStream Methods: