summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-10-27 04:07:03 (EDT)
committerEike Stepper2006-10-27 04:07:03 (EDT)
commit3dcfb43259997d4be5d8e40c3756258bd63e5deb (patch)
treee57a9b5b088f2ef98bdb0cd7992477fef512e82f
parent1bcacac809060fb9c71153d3cfb7cba3654ccb02 (diff)
downloadcdo-3dcfb43259997d4be5d8e40c3756258bd63e5deb.zip
cdo-3dcfb43259997d4be5d8e40c3756258bd63e5deb.tar.gz
cdo-3dcfb43259997d4be5d8e40c3756258bd63e5deb.tar.bz2
String I/O
-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.java5
-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.java5
4 files changed, 14 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 6039d8c..db0be9c 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
@@ -19,4 +19,6 @@ import java.io.IOException;
public interface ExtendedDataInput extends DataInput
{
public byte[] readByteArray() throws IOException;
+
+ public String readString() throws IOException;
}
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 cf5870c..b83d9da 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
@@ -31,4 +31,9 @@ public class ExtendedDataInputStream extends DataInputStream implements Extended
read(b);
return b;
}
+
+ public String readString() throws IOException
+ {
+ return new String(readByteArray());
+ }
}
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 b572849..1e989a6 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
@@ -19,4 +19,6 @@ import java.io.IOException;
public interface ExtendedDataOutput extends DataOutput
{
public void writeByteArray(byte[] b) throws IOException;
+
+ public void writeString(String str) 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 ea6e276..5b0104a 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
@@ -29,4 +29,9 @@ public class ExtendedDataOutputStream extends DataOutputStream implements Extend
writeInt(b.length);
write(b);
}
+
+ public void writeString(String str) throws IOException
+ {
+ writeByteArray(str.getBytes());
+ }
}