summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-05-12 06:43:29 (EDT)
committerEike Stepper2007-05-12 06:43:29 (EDT)
commitb007a146914bd6d853c2aa2fe44e02b07893a170 (patch)
treecdf9625ed985607551ec205fd5c6c2feefd7c5aa
parent243265c8ea999d12b1c56f6fb358c6102060a3e4 (diff)
downloadcdo-b007a146914bd6d853c2aa2fe44e02b07893a170.zip
cdo-b007a146914bd6d853c2aa2fe44e02b07893a170.tar.gz
cdo-b007a146914bd6d853c2aa2fe44e02b07893a170.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataInput.java2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataInputStream.java7
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataOutput.java2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataOutputStream.java7
4 files changed, 18 insertions, 0 deletions
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataInput.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataInput.java
index 6979eb3..0adb6f6 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataInput.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataInput.java
@@ -21,4 +21,6 @@ public interface ExtendedDataInput extends DataInput
public byte[] readByteArray() throws IOException;
public String readString() throws IOException;
+
+ public Object readObject() throws IOException, ClassNotFoundException;
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataInputStream.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataInputStream.java
index c69e63b..46a700d 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataInputStream.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataInputStream.java
@@ -13,6 +13,7 @@ package org.eclipse.net4j.util.stream;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.io.ObjectInputStream;
/**
* @author Eike Stepper
@@ -62,4 +63,10 @@ public class ExtendedDataInputStream extends DataInputStream implements Extended
return null;
}
}
+
+ public Object readObject() throws IOException, ClassNotFoundException
+ {
+ ObjectInputStream wrapper = new ObjectInputStream(this);
+ return wrapper.readObject();
+ }
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataOutput.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataOutput.java
index 95d77a7..3093f8c 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataOutput.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataOutput.java
@@ -21,4 +21,6 @@ public interface ExtendedDataOutput extends DataOutput
public void writeByteArray(byte[] b) throws IOException;
public void writeString(String str) throws IOException;
+
+ public void writeObject(Object object) throws IOException;
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataOutputStream.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataOutputStream.java
index 5fe760a..762193d 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataOutputStream.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/stream/ExtendedDataOutputStream.java
@@ -12,6 +12,7 @@ package org.eclipse.net4j.util.stream;
import java.io.DataOutputStream;
import java.io.IOException;
+import java.io.ObjectOutputStream;
import java.io.OutputStream;
/**
@@ -41,4 +42,10 @@ public class ExtendedDataOutputStream extends DataOutputStream implements Extend
writeInt(-1);
}
}
+
+ public void writeObject(Object object) throws IOException
+ {
+ ObjectOutputStream wrapper = new ObjectOutputStream(this);
+ wrapper.writeObject(object);
+ }
}