public void beginUnmarshalCustomValue( InputStreamHook stream, boolean calledDefaultWriteObject, boolean hasReadObject) throws IOException { if (hasReadObject) { if (calledDefaultWriteObject) stream.setState(IN_READ_OBJECT_DEFAULTS_SENT); else { try { if (stream.getStreamFormatVersion() == 2) ((ValueInputStream) stream.getOrbStream()).start_value(); } catch (Exception e) { // This will happen for Big Integer which uses // writeFields in it's writeObject. We should be past // start_value by now. // NOTE: If we don't log any exception here we should // be fine. If there is an error, it will be caught // while reading the optional data. } stream.setState(IN_READ_OBJECT_OPT_DATA); } } else { if (calledDefaultWriteObject) stream.setState(NO_READ_OBJECT_DEFAULTS_SENT); else // XXX I18N and logging needed. throw new StreamCorruptedException("No default data sent"); } }
public void endDefaultReadObject(InputStreamHook stream) throws IOException { // Read the fake valuetype header in stream format version 2 if (stream.getStreamFormatVersion() == 2) ((ValueInputStream) stream.getOrbStream()).start_value(); stream.setState(IN_READ_OBJECT_OPT_DATA); }
public void endUnmarshalCustomValue(InputStreamHook stream) throws IOException { // Code should read default fields before calling this if (stream.getStreamFormatVersion() == 2) { ((ValueInputStream) stream.getOrbStream()).start_value(); ((ValueInputStream) stream.getOrbStream()).end_value(); } stream.setState(DEFAULT_STATE); }
public void endUnmarshalCustomValue(InputStreamHook stream) { // In stream format version 2, we can skip over // the optional data this way. In stream format version 1, // we will probably wind up with an error if we're // unmarshaling a superclass. if (stream.getStreamFormatVersion() == 2) { ((ValueInputStream) stream.getOrbStream()).start_value(); ((ValueInputStream) stream.getOrbStream()).end_value(); } stream.setState(DEFAULT_STATE); }
public void endUnmarshalCustomValue(InputStreamHook stream) throws IOException { if (stream.getStreamFormatVersion() == 2) { ((ValueInputStream) stream.getOrbStream()).end_value(); } stream.setState(DEFAULT_STATE); }