protected InputStream resolveIntoStream(String sheet) throws IOException {
        if (baseDir != null) {
            File file = baseDir;
            for (String part : sheet.split("/")) {
                file = new File(file, part);
            }
            if (file.exists() && file.isFile()) {
                return new FileInputStream(file);
            } else {
                return null;
            }
        } else {
            InputStream is = getClass().getResourceAsStream((sheet.startsWith("/") ? "" : "/") + sheet);
            if (is == null) {
                is = getClass().getResourceAsStream((sheet.startsWith("/") ? "" : "/") + "_" + sheet);
            }
            return is;
        }
    }
protected InputStream resolveIntoStream ( String sheet ) throws IOException { if ( baseDir != null ) { File file = baseDir ; for ( String part : sheet . split ( "/" ) ) { file = new File ( file , part ) ; } if ( file . exists ( ) && file . isFile ( ) ) { return new FileInputStream ( file ) ; } else { return null ; } } else { InputStream is = getClass ( ) . getResourceAsStream ( ( sheet . startsWith ( "/" ) ? "" : "/" ) + sheet ) ; if ( is == null ) { is = getClass ( ) . getResourceAsStream ( ( sheet . startsWith ( "/" ) ? "" : "/" ) + "_" + sheet ) ; } return is ; } }
Resolves the given file name into an {@link InputStream}

@param sheet the file to resolve (already cleaned up by replacing \ with / and appending .scss if necessary).
@return an InputStream for the resolved data or <tt>null</tt> to indicate that the resource cannot be found
@throws IOException in case of an error while resolving or reading the contents