/** * Reads the state of a {@code StringBuilder} from the passed stream and * restores it to this instance. * * @param in * the stream to read the state from. * @throws IOException * if the stream throws it during the read. * @throws ClassNotFoundException * if the stream throws it during the read. */ private void readObject(java.io.ObjectInputStream inJ) { //throws IOException, //ClassNotFoundException { inJ.defaultReadObject(); int count = inJ.readInt(); char[] value = (char[]) inJ.readObject(); set(value, count); }
/** * Reads the data necessary for <code>put()</code> to work in the superclass. */ protected virtual void doreadObject(java.io.ObjectInputStream inJ) { //throws IOException, ClassNotFoundException { maxSizeJ = inJ.readInt(); base.doReadObject(inJ); }
/* * Customized deserialization. */ private void readObject(java.io.ObjectInputStream inJ) { //throws IOException, ClassNotFoundException { inJ.defaultReadObject(); byte major = inJ.readByte(); byte minor = inJ.readByte(); // only check MAJOR version if (major != MAJOR) { // logging.5=Different version - {0}.{1} throw new java.io.IOException("Different version - "+ //$NON-NLS-1$ java.lang.Byte.valueOf(major)+"."+ java.lang.Byte.valueOf(minor)); } int length = inJ.readInt(); if (length >= 0) { parameters = new Object[length]; for (int i = 0; i < parameters.Length; i++) { parameters[i] = inJ.readObject(); } } if (null != resourceBundleName) { try { resourceBundle = Logger.loadResourceBundle(resourceBundleName); } catch (MissingResourceException e) { // Cannot find the specified resource bundle resourceBundle = null; } } }
// Externalizable interface //------------------------------------------------------------------------- public override void readExternal(java.io.ObjectInput inJ) { // throws IOException, ClassNotFoundException { maximumSize = inJ.readInt(); int size = inJ.readInt(); for (int i = 0; i < size; i++) { Object key = inJ.readObject(); Object value = inJ.readObject(); put(key, value); } }