Package org.fcrepo.common

Examples of org.fcrepo.common.FaultException


                                Map<String, String> hints) {
        try {
            return connection.getBlob(blobId, hints);
        } catch (Exception e) {
            logger.error(e.toString(),e);
            throw new FaultException("System error getting blob handle", e);
        }
    }
View Full Code Here


            return blob.openInputStream();
        } catch (MissingBlobException e) { // subclass of IOException
            throw e;
        } catch (IOException e) {
            logger.error(e.toString(),e);
            throw new FaultException("System error opening input stream", e);
        }
    }
View Full Code Here

            return blob.openOutputStream(estimatedSize, overwrite);
        } catch (DuplicateBlobException e) { // subclass of IOException
            throw e;
        } catch (IOException e) {
            logger.error(e.toString(),e);
            throw new FaultException("System error opening output stream", e);
        }
    }
View Full Code Here

    private static boolean exists(Blob blob) {
        try {
            return blob.exists();
        } catch (IOException e) {
            logger.error(e.toString(),e);
            throw new FaultException(
                    "System error determining existence of blob", e);
        }
    }
View Full Code Here

            else {
                logger.warn("Attempted to delete non-existent blob " + blob.getCanonicalId());
            }
        } catch (IOException e) {
            logger.error(e.toString(),e);
            throw new FaultException("System error deleting blob", e);
        }
    }
View Full Code Here

    private static Iterator<URI> listBlobIds(BlobStoreConnection connection) {
        try {
            return connection.listBlobIds(null); // all
        } catch (IOException e) {
            logger.error(e.toString(),e);
            throw new FaultException("System error listing blob ids", e);
        }
    }
View Full Code Here

    private static long copy(InputStream source, OutputStream sink) {
        try {
            return IOUtils.copyLarge(source, sink);
        } catch (IOException e) {
            logger.error(e.toString(),e);
            throw new FaultException("System error copying stream", e);
        } finally {
            IOUtils.closeQuietly(source);
            IOUtils.closeQuietly(sink);
        }
    }
View Full Code Here

    private static String uriEncode(String s) {
        try {
            return URLEncoder.encode(s, "UTF-8");
        } catch (UnsupportedEncodingException wontHappen) {
            throw new FaultException(wontHappen);
        }
    }
View Full Code Here

    private static String uriDecode(String s) {
        try {
            return URLDecoder.decode(s, "UTF-8");
        } catch (UnsupportedEncodingException wontHappen) {
            throw new FaultException(wontHappen);
        }
    }
View Full Code Here

                public boolean hasNext() { return keys.hasMoreElements(); }
                public String next() { return keys.nextElement(); }
                public void remove() { throw new UnsupportedOperationException(); }
            };
        } catch (LowlevelStorageException e) {
            throw new FaultException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.fcrepo.common.FaultException

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.