Package org.owasp.webscarab.model

Examples of org.owasp.webscarab.model.StoreException


            }
            public void finished() {
                Object result = getValue();
                if (result == null) return;
                if (result instanceof StoreException) {
                    StoreException se = (StoreException) result;
                    JOptionPane.showMessageDialog(null, new String[] {"Error loading Session : ", se.toString()}, "Error", JOptionPane.ERROR_MESSAGE);
                }
            }
        }.start();
    }
View Full Code Here


     */   
    public void setSession(String type, Object store, String session) throws StoreException {
        if (type.equals("FileSystem") && (store instanceof File)) {
            _model.setStore(new FileSystemStore((File) store, session));
        } else {
            throw new StoreException("Store type '" + type + "' is not supported in " + getClass().getName());
        }
    }
View Full Code Here

        create();
    }
   
    private void create() throws StoreException {
        if (! _dir.exists()) {
            throw new StoreException( _dir + " does not exist!");
        }
        _dir = new File(_dir,"fragments");
        if (!_dir.exists() && !_dir.mkdirs()) {
            throw new StoreException("Couldn't create directory " + _dir);
        } else if (!_dir.isDirectory()) {
            throw new StoreException(_dir + " exists, and is not a directory!");
        }
        load();
    }
View Full Code Here

                }
            }
            br.close();
        } catch (FileNotFoundException fnfe) { // nothing to do
        } catch (IOException ioe) {
            throw new StoreException("IOException reading the index: " + ioe);
        }
    }
View Full Code Here

                bw.write("\r\n");
            }
            bw.close();
        } catch (FileNotFoundException fnfe) { // nothing to do
        } catch (IOException ioe) {
            throw new StoreException("IOException reading the index: " + ioe);
        }
    }
View Full Code Here

  @Override
    public void setSession(String type, Object store, String session) throws StoreException {
        if (type.equals("FileSystem") && (store instanceof File)) {
            model.setStore(new FileSystemStore((File) store, session));
        } else {
            throw new StoreException("Store type '" + type + "' is not supported in " + getClass().getName());
        }
    }
View Full Code Here

            }
            public void finished() {
                Object result = getValue();
                if (result == null) return;
                if (result instanceof StoreException) {
                    StoreException se = (StoreException) result;
                    JOptionPane.showMessageDialog(null, new String[] {"Error loading Session : ", se.toString()}, "Error", JOptionPane.ERROR_MESSAGE);
                }
            }
        }.start();
    }
View Full Code Here

                    SessionID id = new SessionID(line);
                    list.add(id);
                }
            }
        } catch (IOException ioe) {
            throw new StoreException("Error reading sessionids: " + ioe);
        }
    }
View Full Code Here

    }
   
    public void flush() throws StoreException {
        File f = new File(_dir, "sessionids");
        if (f.exists() && !f.isFile()) {
            throw new StoreException("Couldn't create output file " + f);
        }
        try {
            BufferedWriter bw = new BufferedWriter(new FileWriter(f));
            Iterator<String> it = _sessionIDs.keySet().iterator();
            while (it.hasNext()) {
                String key = it.next();
                bw.write(key + "\r\n");
                List<SessionID> list = _sessionIDs.get(key);
                Iterator<SessionID> it2 = list.iterator();
                while (it2.hasNext()) {
                    SessionID id = it2.next();
                    bw.write(id.toString() + "\r\n");
                }
                bw.write("\r\n");
            }
            bw.flush();
            bw.close();
        } catch (IOException ioe) {
            throw new StoreException("IOException: " + ioe);
        }
    }
View Full Code Here

   
    public void setSession(String type, Object store, String session) throws StoreException {
        if (type.equals("FileSystem") && (store instanceof File)) {
            _model.setStore(new FileSystemStore((File) store));
        } else {
            throw new StoreException("Store type '" + type + "' is not supported in " + getClass().getName());
        }
    }
View Full Code Here

TOP

Related Classes of org.owasp.webscarab.model.StoreException

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.