Package org.openjena.atlas

Examples of org.openjena.atlas.AtlasException


    @Override
    public void close() {
        try {
            out.close() ;
        } catch (IOException e) {
            new AtlasException(e) ;
        }
    }
View Full Code Here


        this.comparator = comparator;
    }
   
    protected void checkClosed()
    {
        if (closed) throw new AtlasException("SortedDataBag is closed, no operations can be performed on it.") ;
    }
View Full Code Here

    @Override
    public void add(E item)
    {
        checkClosed();
        if (finishedAdding)
            throw new AtlasException("SortedDataBag: Cannot add any more items after the writing phase is complete.");
       
        if (policy.isThresholdExceeded())
        {
            spill();
        }
View Full Code Here

            {
                out = getSpillStream();
            }
            catch (IOException e)
            {
                throw new AtlasException(e);
            }
           
            // Sort the tuples
            // Collections.sort() will copy to an array, sort, and then copy back.  Avoid that
            // extra copy by copying to an array and using Arrays.sort().  Also it lets us use
View Full Code Here

                    for (Iterator<E> it : inputs)
                    {
                        Iter.close(it);
                    }
                   
                    throw new AtlasException("Cannot find one of the spill files", e);
                }
            }
           
            SpillSortIterator<E> ssi = new SpillSortIterator<E>(inputs, comparator);
            registerCloseableIterator(ssi);
View Full Code Here

                memory = new ArrayList<E>() ;
            }
        }
        catch (IOException e)
        {
            throw new AtlasException(e) ;
        }
    }
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

                    {
                        in.close();
                    }
                    catch (IOException e)
                    {
                        uncaughtException = new AtlasException("Error closing input stream", e);
                    }
                }
            }
        });
        readThread.start();
View Full Code Here

                if ( i == off )
                    return -1 ;
                return (i-off) ;
            }
            if ( x > 128 )
                throw new AtlasException("Illegal ASCII character : "+x) ;
            cbuf[i] = (char)x ;
        }
        return len ;
    }
View Full Code Here

        this.serializationFactory = serializerFactory;
    }
   
    private void checkClosed()
    {
        if (closed) throw new AtlasException("DefaultDataBag is closed, no operations can be performed on it.") ;
    }
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.