Package org.openjena.atlas

Examples of org.openjena.atlas.AtlasException


       
        try {
            outputTriples = new FileOutputStream(dataFileTriples) ;
            outputQuads = new FileOutputStream(dataFileQuads) ;
        }
        catch (FileNotFoundException e) { throw new AtlasException(e) ; }
       
        NodeTableBuilder sink = new NodeTableBuilder(dsg, monitor, outputTriples, outputQuads) ;
        Sink<Triple> sink2 = new SinkExtendTriplesToQuads(sink) ;
       
        monitor.start() ;
View Full Code Here


                        colNum = INIT_COL ;
                    }
                    else
                        colNum++;
                    if ( ! Character.isDefined(ch) )
                        throw new AtlasException(String.format("No such codepoint: 0x%04X", ch)) ;
                }
                System.out.printf("%s: chars = %d , lines = %d\n", fn, charCount, lineNum) ;
            } catch (AtlasException ex)
            {
                System.out.printf(label+"[line=%d, col=%d] %s\n", lineNum, colNum, ex.getMessage()) ;
View Full Code Here

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

    static public InputStream openFile(String filename)
    {
        try {
           return openFileEx(filename) ;
        }
        catch (Exception ex) { throw new AtlasException(ex) ; }
    }
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

    }
   

    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

        else
            IO.exception(new IOException("Illegal UTF-8: "+x)) ;

        // This test will go off.  We're processing a 4 byte sequence but Java only supports 16 bit chars.
        if ( ch > Character.MAX_VALUE )
            throw new AtlasException("Out of range character (must use a surrogate pair)") ;
        if ( ! Character.isDefined(ch) ) throw new AtlasException(String.format("Undefined codepoint: 0x%04X", ch)) ;
        return ch ;
    }
View Full Code Here

        int x = start ;
        for ( int i = 0 ; i < len-1 ; i++ )
        {
            int x2 = input.advance() ;
            if ( x2 == -1 )
                throw new AtlasException("Premature end to UTF-8 sequence at end of input") ;
           
            if ( (x2 & 0xC0) != 0x80 )
                //throw new AtlasException("Illegal UTF-8 processing character "+count+": "+x2) ;
                throw new AtlasException(String.format("Illegal UTF-8 processing character: 0x%04X",x2)) ;
            // 6 bits of x2
            x = (x << 6) | (x2 & 0x3F);
        }
        return x ;
    }
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.openjena.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.