Package org.apache.jena.atlas

Examples of org.apache.jena.atlas.AtlasException


    static public InputStream openFile(String filename)
    {
        try {
           return openFileEx(filename) ;
        }
        catch (Exception ex) { throw new AtlasException(ex) ; }
    }
View Full Code Here


        try { resource.close()} catch (Exception ex) { }
    }

    public static void exception(IOException ex)
    {
        throw new AtlasException(ex) ;
    }
View Full Code Here

        throw new AtlasException(ex) ;
    }

    public static void exception(String msg, IOException ex)
    {
        throw new AtlasException(msg, ex) ;
    }
View Full Code Here

   
    /** Convert an IRI to a filename */
    public static String IRIToFilename(String iri)
    {
        if ( ! iri.startsWith("file:") )
            throw new AtlasException("Not a file: URI: "+iri) ;
       
        String fn ;
        if ( iri.startsWith("file:///") )
            fn = iri.substring("file://".length()) ;
        else
View Full Code Here

            if ( logging && classLoader != null )
                log.trace("Using system classloader") ;
        }
       
        if ( classLoader == null )
            throw new AtlasException("Failed to find a classloader") ;
        return classLoader ;
    }
View Full Code Here

    public static void setJavaLogging(String file) {
        try {
            InputStream details = new FileInputStream(file) ;
            java.util.logging.LogManager.getLogManager().readConfiguration(details) ;
        } catch (Exception ex) {
            throw new AtlasException(ex) ;
        }
    }
View Full Code Here

    public static PeekReader open(String filename) {
        try {
            InputStream in = new FileInputStream(filename) ;
            return makeUTF8(in) ;
        } catch (FileNotFoundException ex) {
            throw new AtlasException("File not found: " + filename) ;
        }
    }
View Full Code Here

        try {
            InputStream details = new ByteArrayInputStream(defaultProperties.getBytes("UTF-8")) ;
            java.util.logging.LogManager.getLogManager().readConfiguration(details) ;
   
        } catch (Exception ex) {
            throw new AtlasException(ex) ;
        }
    }
View Full Code Here

        {
            blacklist = getInputIterator(firstSpillFile);
        }
        catch ( FileNotFoundException e )
        {
            throw new AtlasException("Cannot find the first spill file", e);
        }
       
        // TODO: Improve performance by making the superclass .iterator() use getNetSpillFiles()
        // instead of getSpillFiles() so it doesn't contain the contents of the first file
        Iterator<E> rest = super.iterator();
View Full Code Here

    public static boolean isEmpty(String filename)
    {
        File f = new File(filename) ;
        if ( f.exists() ) return true ;
        if ( f.isFile() ) return f.length() == 0 ;
        throw new AtlasException("Not a file") ;
    }
View Full Code Here

TOP

Related Classes of org.apache.jena.atlas.AtlasException

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.