01: package com.jeta.forms.store;
02:
03: import java.io.IOException;
04: import java.io.ObjectInput;
05:
06: public class JavaExternalizableObjectInput implements JETAObjectInput {
07:
08: private ObjectInput m_in;
09:
10: public JavaExternalizableObjectInput(ObjectInput delegate) {
11: m_in = delegate;
12: }
13:
14: public int readVersion() throws IOException {
15: return m_in.readInt();
16: }
17:
18: public float readFloat(String tagName) throws IOException {
19: return m_in.readFloat();
20: }
21:
22: public float readFloat(String tagName, float defaultValue)
23: throws IOException {
24: return m_in.readFloat();
25: }
26:
27: public int readInt(String tagName) throws IOException {
28: return m_in.readInt();
29: }
30:
31: public int readInt(String tagName, int defaultValue)
32: throws IOException {
33: return m_in.readInt();
34: }
35:
36: public Object readObject(String tabName)
37: throws ClassNotFoundException, IOException {
38: return m_in.readObject();
39: }
40:
41: public String readString(String string) throws IOException {
42: try {
43: return (String) m_in.readObject();
44: } catch (ClassNotFoundException e) {
45: throw new IOException(
46: "JavaExternalizableObjectInput readString failed. ClassNotFoundException. Expected a String object");
47: }
48: }
49:
50: public boolean readBoolean(String string) throws IOException {
51: return m_in.readBoolean();
52: }
53:
54: public JETAObjectInput getSuperClassInput() {
55: return this ;
56: }
57:
58: public boolean readBoolean(String tagName, boolean defaultValue)
59: throws IOException {
60: return readBoolean(tagName);
61: }
62:
63: }
|