01: /*
02: * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
03: *
04: * http://izpack.org/ http://izpack.codehaus.org/
05: *
06: * Copyright 2007 Dennis Reil
07: *
08: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
09: * in compliance with the License. You may obtain a copy of the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software distributed under the License
14: * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
15: * or implied. See the License for the specific language governing permissions and limitations under
16: * the License.
17: */
18: package com.izforge.izpack.io;
19:
20: import java.io.IOException;
21:
22: /**
23: * Exception, indicating, that a volume was not found.
24: *
25: * @author Dennis Reil, <Dennis.Reil@reddot.de>
26: */
27: public class VolumeNotFoundException extends IOException {
28:
29: protected String volumename;
30:
31: protected long alreadyskippedbytes;
32:
33: private static final long serialVersionUID = 9062182895972373707L;
34:
35: public VolumeNotFoundException() {
36: super ();
37: }
38:
39: public VolumeNotFoundException(String message, String volumename) {
40: super (message);
41: this .volumename = volumename;
42: }
43:
44: /**
45: * Returns the name of the volume, which couldn't be found
46: *
47: * @return the name of the volume
48: */
49: public String getVolumename() {
50: return volumename;
51: }
52:
53: /**
54: * Returns the amount of skipped bytes, if a skip-operation was in progress
55: *
56: * @return the amount of skipped bytes
57: */
58: public long getAlreadyskippedbytes() {
59: return alreadyskippedbytes;
60: }
61:
62: /**
63: * Sets the amount of already skipped bytes.
64: *
65: * @param alreadyskippedbytes
66: */
67: public void setAlreadyskippedbytes(long alreadyskippedbytes) {
68: this.alreadyskippedbytes = alreadyskippedbytes;
69: }
70: }
|