Package org.geowebcache.storage

Examples of org.geowebcache.storage.StorageException


        // ceiling. File.length() returns 0 if the file does not exist anyway
        final long length = fh.length();
        final boolean exists = length > 0;
        if (exists) {
            if (!fh.delete()) {
                throw new StorageException("Unable to delete " + fh.getAbsolutePath());
            }
            stObj.setBlobSize((int) length);
            listeners.sendTileDeleted(stObj);

            ret = true;
View Full Code Here


            return true;
        }
       
        // We either want to delete it, or stuff within it
        if (!layerPath.isDirectory() || !layerPath.canWrite()) {
            throw new StorageException(prefix + " does is not a directory or is not writable.");
        }
       
        final FilePathFilter tileFinder = new FilePathFilter(trObj);

        final String layerName = trObj.getLayerName();
View Full Code Here

               
                channel = fos.getChannel();
                try {
                    stObj.getBlob().transferTo(channel);
                } catch (IOException ioe) {
                    throw new StorageException(ioe.getMessage() + " for " + target.getAbsolutePath());
                } finally {
                    try {
                        if(channel != null) {
                            channel.close();
                        }
                    } catch (IOException ioe) {
                        throw new StorageException(ioe.getMessage() + " for " + target.getAbsolutePath());
                    }
                }
            } catch (FileNotFoundException ioe) {
                throw new StorageException(ioe.getMessage() + " for " + target.getAbsolutePath());
            } finally {
                IOUtils.closeQuietly(fos);
            }
           
            // rename to final position. This will fail if another GWC also wrote this
View Full Code Here

        }
       
    }

    public void clear() throws StorageException {
        throw new StorageException("Not implemented yet!");
    }
View Full Code Here

TOP

Related Classes of org.geowebcache.storage.StorageException

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.