diff options
author | Mark Spruiell <mes@zeroc.com> | 2012-06-01 15:18:35 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2012-06-01 15:18:35 -0700 |
commit | f8f74e93981c92113c486b6c5b2752de36e95752 (patch) | |
tree | 85ba37ff9eed6bf417ad3ab1c3343415c7f9c421 /java/src/Ice/InputStream.java | |
parent | removing hasObjects/clearObjects from SlicedData (diff) | |
download | ice-f8f74e93981c92113c486b6c5b2752de36e95752.tar.bz2 ice-f8f74e93981c92113c486b6c5b2752de36e95752.tar.xz ice-f8f74e93981c92113c486b6c5b2752de36e95752.zip |
Java port
Diffstat (limited to 'java/src/Ice/InputStream.java')
-rw-r--r-- | java/src/Ice/InputStream.java | 49 |
1 files changed, 38 insertions, 11 deletions
diff --git a/java/src/Ice/InputStream.java b/java/src/Ice/InputStream.java index aff945a49b6..d7194e757f1 100644 --- a/java/src/Ice/InputStream.java +++ b/java/src/Ice/InputStream.java @@ -189,21 +189,48 @@ public interface InputStream void readObject(ReadObjectCallback cb); /** - * Extracts a Slice type ID from the stream. + * Extracts a user exception from the stream and throws it. + **/ + void throwException() throws UserException; + + /** + * Extracts a user exception from the stream and throws it, using the supplied + * factory to instantiate a UserExceptionReader. * - * @return The extracted type ID. + * @param factory A factory that creates UserExceptionReader instances. **/ - String readTypeId(); + void throwException(UserExceptionReaderFactory factory) throws UserException; /** - * Extracts a user exception from the stream and throws it. + * Marks the start of an Ice object. **/ - void throwException() throws UserException; + void startObject(); + + /** + * Marks the end of an Ice object. + * + * @return A SlicedData object containing the preserved slices for unknown types. + **/ + SlicedData endObject(boolean preserve); + + /** + * Marks the start of a user exception. + **/ + void startException(); + + /** + * Marks the end of a user exception. + * + * @return A SlicedData object containing the preserved slices for unknown types. + **/ + SlicedData endException(boolean preserve); /** * Reads the start of an object or exception slice. + * + * @return The Slice type ID for this slice. **/ - void startSlice(); + String startSlice(); /** * Indicates that the end of an object or exception slice has been reached. @@ -223,6 +250,11 @@ public interface InputStream Ice.EncodingVersion startEncapsulation(); /** + * Indicates that the end of an encapsulation has been reached. + **/ + void endEncapsulation(); + + /** * Skips over an encapsulation. * * @return The encapsulation encoding version. @@ -230,11 +262,6 @@ public interface InputStream Ice.EncodingVersion skipEncapsulation(); /** - * Indicates that the end of an encapsulation has been reached. - **/ - void endEncapsulation(); - - /** * Indicates that unmarshaling is complete, except for any Slice objects. The application must call this method * only if the stream actually contains Slice objects. Calling <code>readPendingObjects</code> triggers the * calls to {@link ReadObjectCallback#invoke} that inform the application that unmarshaling of a Slice |