Package org.apache.metamodel.util

Examples of org.apache.metamodel.util.ResourceException


    public void read(Action<InputStream> action) throws ResourceException {
        final InputStream in = read();
        try {
            action.run(in);
        } catch (Exception e) {
            throw new ResourceException(this, "Error occurred in read callback", e);
        } finally {
            FileHelper.safeClose(in);
        }
    }
View Full Code Here


    public <E> E read(Func<InputStream, E> func) throws ResourceException {
        final InputStream in = read();
        try {
            return func.eval(in);
        } catch (Exception e) {
            throw new ResourceException(this, "Error occurred in read callback", e);
        } finally {
            FileHelper.safeClose(in);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.metamodel.util.ResourceException

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.