Package org.apache.pivot.util.concurrent

Examples of org.apache.pivot.util.concurrent.AbortException


        @Override
        public ArrayList<File> execute() {
            FileBrowser fileBrowser = (FileBrowser)getComponent();
            File rootDirectory = fileBrowser.getRootDirectory();
            if (abort) {
                throw new AbortException();
            }

            File[] files = rootDirectory.listFiles(new FullFileFilter(includeFileFilter, excludeFileFilter));
            if (abort) {
                throw new AbortException();
            }

            Arrays.sort(files, fileComparator);

            return new ArrayList<File>(files, 0, files.length);
View Full Code Here


        }

        @Override
        public int read() throws IOException {
            if (abort) {
                throw new AbortException();
            }

            int result = inputStream.read();

            if (result != -1) {
View Full Code Here

        }

        @Override
        public int read(byte b[]) throws IOException {
            if (abort) {
                throw new AbortException();
            }

            int count = inputStream.read(b);

            if (count != -1) {
View Full Code Here

        }

        @Override
        public int read(byte b[], int off, int len) throws IOException {
            if (abort) {
                throw new AbortException();
            }

            int count = inputStream.read(b, off, len);

            if (count != -1) {
View Full Code Here

        }

        @Override
        public long skip(long n) throws IOException {
            if (abort) {
                throw new AbortException();
            }

            long count = inputStream.skip(n);
            bytesReceived += count;
            return count;
View Full Code Here

        }

        @Override
        public int available() throws IOException {
            if (abort) {
                throw new AbortException();
            }

            return inputStream.available();
        }
View Full Code Here

        }

        @Override
        public void mark(int readLimit) {
            if (abort) {
                throw new AbortException();
            }

            inputStream.mark(readLimit);
            mark = bytesReceived;
        }
View Full Code Here

        }

        @Override
        public void reset() throws IOException {
            if (abort) {
                throw new AbortException();
            }

            inputStream.reset();
            bytesReceived = mark;
        }
View Full Code Here

        }

        @Override
        public void flush() throws IOException {
            if (abort) {
                throw new AbortException();
            }

            outputStream.flush();
        }
View Full Code Here

        }

        @Override
        public void write(byte[] b) throws IOException {
            if (abort) {
                throw new AbortException();
            }

            outputStream.write(b);
            bytesSent += b.length;
        }
View Full Code Here

TOP

Related Classes of org.apache.pivot.util.concurrent.AbortException

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.