Package java.io

Examples of java.io.InvalidObjectException


          file = new File(parentDir, op.name);
          file.delete();
          deleteDir(parentDir);
        }
      } else {
        throw new InvalidObjectException("Unknow object in log.");
      }
    }
  }
View Full Code Here


    /**
     * Resolves instances being deserialized to the predefined constants.
     */
    protected Object readResolve() throws InvalidObjectException {
        if (this.getClass() != TextAttribute.class) {
            throw new InvalidObjectException(
    "subclass didn't correctly implement readResolve");
        }
       
        TextAttribute instance = (TextAttribute) instanceMap.get(getName());
        if (instance != null) {
            return instance;
        } else {
            throw new InvalidObjectException("unknown attribute name");
        }
    }
View Full Code Here

         *         resolved.
         * @return resolved DateFormat.Field constant
         */
        protected Object readResolve() throws InvalidObjectException {
            if (this.getClass() != DateFormat.Field.class) {
                throw new InvalidObjectException("subclass didn't correctly implement readResolve");
            }

            Object instance = instanceMap.get(getName());
            if (instance != null) {
                return instance;
            } else {
                throw new InvalidObjectException("unknown attribute name");
            }
        }
View Full Code Here

     * @throws InvalidObjectException if the objects read from the stream is invalid.
     */
    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        in.defaultReadObject();
        if (choiceLimits.length != choiceFormats.length) {
            throw new InvalidObjectException(
                    "limits and format arrays of different length.");
        }
    }
View Full Code Here

  port = -1;      // Argh
  is.defaultReadObject();
  try {
      new Parser(string).parse(false);
  } catch (URISyntaxException x) {
      IOException y = new InvalidObjectException("Invalid URI");
      y.initCause(x);
      throw y;
  }
    }
View Full Code Here

    /**
      * prevent default deserialization
      */
    private void readObject(ObjectInputStream in) throws IOException,
        ClassNotFoundException {
            throw new InvalidObjectException("can't deserialize enum");
    }
View Full Code Here

        ClassNotFoundException {
            throw new InvalidObjectException("can't deserialize enum");
    }

    private void readObjectNoData() throws ObjectStreamException {
        throw new InvalidObjectException("can't deserialize enum");
    }
View Full Code Here

                    lastOffset = offsets[i];
                }
            }
        }
        if (!isValid) {
            throw new InvalidObjectException("Could not reconstruct MessageFormat from corrupt stream.");
        }
    }
View Full Code Here

         *         resolved.
         * @return resolved MessageFormat.Field constant
         */
        protected Object readResolve() throws InvalidObjectException {
            if (this.getClass() != MessageFormat.Field.class) {
                throw new InvalidObjectException("subclass didn't correctly implement readResolve");
            }

            return ARGUMENT;
        }
View Full Code Here

     
  ipaddress = (byte[])ipaddress.clone();

  // Check that our invariants are satisfied
  if (ipaddress.length != INADDRSZ) {
      throw new InvalidObjectException("invalid address length: "+
               ipaddress.length);
  }
 
  if (family != IPv6) {
      throw new InvalidObjectException("invalid address family type");
  }
    }
View Full Code Here

TOP

Related Classes of java.io.InvalidObjectException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.