Commit 7b51dd28 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Added more util methods.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@8298 b35dd754-fafc-0310-a699-88a17e54d16e
parent 6df47da5
......@@ -141,6 +141,15 @@ public class DummyExternalizableUtil implements ExternalizableUtilStrategy {
return false;
}
public void writeByteArray(DataOutput out, byte[] value) throws IOException {
// Do nothing
}
public byte[] readByteArray(DataInput in) throws IOException {
// Do nothing
return new byte[0];
}
public void writeSafeUTF(DataOutput out, String value) {
// Do nothing
}
......
......@@ -194,6 +194,14 @@ public class ExternalizableUtil {
return strategy.readBoolean(in);
}
public void writeByteArray(DataOutput out, byte[] value) throws IOException {
strategy.writeByteArray(out, value);
}
public byte[] readByteArray(DataInput in) throws IOException {
return strategy.readByteArray(in);
}
public void writeSafeUTF(DataOutput out, String value) throws IOException {
strategy.writeSafeUTF(out, value);
}
......
......@@ -116,6 +116,10 @@ public interface ExternalizableUtilStrategy {
boolean readBoolean(DataInput in) throws IOException;
void writeByteArray(DataOutput out, byte[] value) throws IOException;
byte[] readByteArray(DataInput in) throws IOException;
void writeSafeUTF(DataOutput out, String value) throws IOException;
String readSafeUTF(DataInput in) throws IOException;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment