diff options
author | Mark Spruiell <mes@zeroc.com> | 2012-11-12 13:15:24 -0800 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2012-11-12 13:15:24 -0800 |
commit | 93718cc38ba615c7e4993ad00643134fbe6902ea (patch) | |
tree | 925d1a6705e0ee1954ed6b49a5ce1c8ea54a85e8 /java/src/Ice/Util.java | |
parent | Android chat demo minor fix (diff) | |
download | ice-93718cc38ba615c7e4993ad00643134fbe6902ea.tar.bz2 ice-93718cc38ba615c7e4993ad00643134fbe6902ea.tar.xz ice-93718cc38ba615c7e4993ad00643134fbe6902ea.zip |
ICE-4932 - accept encoding when creating streams
Diffstat (limited to 'java/src/Ice/Util.java')
-rw-r--r-- | java/src/Ice/Util.java | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/java/src/Ice/Util.java b/java/src/Ice/Util.java index 822e8559efc..328aee186fa 100644 --- a/java/src/Ice/Util.java +++ b/java/src/Ice/Util.java @@ -430,7 +430,8 @@ public final class Util } /** - * Creates an input stream for dynamic invocation and dispatch. + * Creates an input stream for dynamic invocation and dispatch. The stream uses + * the communicator's default encoding version. * * @param communicator The communicator for the stream. * @param bytes An encoded request or reply. @@ -443,7 +444,23 @@ public final class Util } /** - * Creates an output stream for dynamic invocation and dispatch. + * Creates an input stream for dynamic invocation and dispatch. The stream uses + * the given encoding version. + * + * @param communicator The communicator for the stream. + * @param bytes An encoded request or reply. + * @param v The desired encoding version. + * @return The input stream. + **/ + public static InputStream + createInputStream(Communicator communicator, byte[] bytes, EncodingVersion v) + { + return new InputStreamI(communicator, bytes, v); + } + + /** + * Creates an output stream for dynamic invocation and dispatch. The stream uses + * the communicator's default encoding version. * * @param communicator The communicator for the stream. * @return The output stream. @@ -455,6 +472,20 @@ public final class Util } /** + * Creates an output stream for dynamic invocation and dispatch. The stream uses + * the given encoding version. + * + * @param communicator The communicator for the stream. + * @param v The desired encoding version. + * @return The output stream. + **/ + public static OutputStream + createOutputStream(Communicator communicator, EncodingVersion v) + { + return new OutputStreamI(communicator, v); + } + + /** * Returns the process-wide logger. * * @return The process-wide logger. |