Package org.apache.sis.util.resources

Examples of org.apache.sis.util.resources.Errors


        final List<Thread> threads = DaemonThread.listStalledThreads(lastCreatedDaemon);
        if (threads == null) {
            return null;
        }
        final String[] warnings = new String[threads.size()];
        final Errors resources = Errors.getResources(locale);
        for (int i=0; i<warnings.length; i++) {
            final Thread thread = threads.get(i);
            warnings[i] = resources.getString(thread.isAlive() ?
                    Errors.Keys.StalledThread_1 : Errors.Keys.DeadThread_1, thread.getName());
        }
        return warnings;
    }
View Full Code Here


    private int ensureBufferContains(final int n, final int dataSize, String name) throws IOException, DataStoreException {
        // (n+3) & ~3  is a trick for rounding 'n' to the next multiple of 4.
        final long size = ((n & 0xFFFFFFFFL) * dataSize + 3) & ~3;
        if (size > input.buffer.capacity()) {
            name = input.filename + DefaultNameSpace.DEFAULT_SEPARATOR + name;
            final Errors errors = errors();
            throw new DataStoreException(n < 0 ?
                    errors.getString(Errors.Keys.NegativeArrayLength_1, name) :
                    errors.getString(Errors.Keys.ExcessiveListSize_2, name, n));
        }
        input.ensureBufferContains((int) size);
        return (int) size;
    }
View Full Code Here

    private int ensureBufferContains(final int n, final int dataSize, String name) throws IOException, DataStoreException {
        // (n+3) & ~3  is a trick for rounding 'n' to the next multiple of 4.
        final long size = ((n & 0xFFFFFFFFL) * dataSize + 3) & ~3;
        if (size > input.buffer.capacity()) {
            name = input.filename + DefaultNameSpace.DEFAULT_SEPARATOR + name;
            final Errors errors = errors();
            throw new DataStoreException(n < 0 ?
                    errors.getString(Errors.Keys.NegativeArrayLength_1, name) :
                    errors.getString(Errors.Keys.ExcessiveListSize_2, name, n));
        }
        input.ensureBufferContains((int) size);
        return (int) size;
    }
View Full Code Here

        final List<Thread> threads = DaemonThread.listStalledThreads(lastCreatedDaemon);
        if (threads == null) {
            return null;
        }
        final String[] warnings = new String[threads.size()];
        final Errors resources = Errors.getResources(locale);
        for (int i=0; i<warnings.length; i++) {
            final Thread thread = threads.get(i);
            warnings[i] = resources.getString(thread.isAlive() ?
                    Errors.Keys.StalledThread_1 : Errors.Keys.DeadThread_1, thread.getName());
        }
        return warnings;
    }
View Full Code Here

TOP

Related Classes of org.apache.sis.util.resources.Errors

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.