01: package sisc.ser;
02:
03: import java.io.*;
04: import sisc.util.Util;
05:
06: public class SeekableDataInputStream extends DataInputStream implements
07: SeekableDataInput, ObjectInput {
08:
09: protected Seekable sis;
10:
11: public SeekableDataInputStream(SeekableInputStream s) {
12: super (s);
13: sis = s;
14: }
15:
16: public void seek(long pos) throws IOException {
17: sis.seek(pos);
18: }
19:
20: public long getFilePointer() throws IOException {
21: return sis.getFilePointer();
22: }
23:
24: public Object readObject() throws IOException,
25: ClassNotFoundException {
26: throw new IOException(Util.liMessage(Util.SISCB,
27: "cannotdeserialize"));
28: }
29:
30: }
31:
32: /*
33: * The contents of this file are subject to the Mozilla Public
34: * License Version 1.1 (the "License"); you may not use this file
35: * except in compliance with the License. You may obtain a copy of
36: * the License at http://www.mozilla.org/MPL/
37: *
38: * Software distributed under the License is distributed on an "AS
39: * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
40: * implied. See the License for the specific language governing
41: * rights and limitations under the License.
42: *
43: * The Original Code is the Second Interpreter of Scheme Code (SISC).
44: *
45: * The Initial Developer of the Original Code is Scott G. Miller.
46: * Portions created by Scott G. Miller are Copyright (C) 2000-2007
47: * Scott G. Miller. All Rights Reserved.
48: *
49: * Contributor(s):
50: * Matthias Radestock
51: *
52: * Alternatively, the contents of this file may be used under the
53: * terms of the GNU General Public License Version 2 or later (the
54: * "GPL"), in which case the provisions of the GPL are applicable
55: * instead of those above. If you wish to allow use of your
56: * version of this file only under the terms of the GPL and not to
57: * allow others to use your version of this file under the MPL,
58: * indicate your decision by deleting the provisions above and
59: * replace them with the notice and other provisions required by
60: * the GPL. If you do not delete the provisions above, a recipient
61: * may use your version of this file under either the MPL or the
62: * GPL.
63: */
|