Examples of InvalidObjectException


Examples of java.io.InvalidObjectException

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

Examples of java.io.InvalidObjectException

         *         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

Examples of java.io.InvalidObjectException

     
  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

Examples of java.io.InvalidObjectException

   throws IOException, ClassNotFoundException {
   s.defaultReadObject();
 
   // Check that our invariants are satisfied
   if (port < 0 || port > 0xFFFF) {
       throw new InvalidObjectException("port out of range:" + port);
   }
  
   if (hostname == null && addr == null) {
       throw new InvalidObjectException("hostname and addr " +
                "can't both be null");
   }
    }
View Full Code Here

Examples of java.io.InvalidObjectException

  stream.defaultReadObject();

  try {
      compiledPattern = compile(pattern);
  } catch (Exception e) {
      throw new InvalidObjectException("invalid pattern");
  }

  if (serialVersionOnStream < 1) {
      // didn't have defaultCenturyStart field
      initializeDefaultCentury();
View Full Code Here

Examples of java.io.InvalidObjectException

    /**
     * @throws InvalidObjectException unconditionally
     **/
    private void readObjectNoData() throws InvalidObjectException {
        throw new InvalidObjectException("no data in stream; class: " +
                                         this.getClass().getName());
    }
View Full Code Here

Examples of java.io.InvalidObjectException

            minimumFractionDigits = minFractionDigits;
        }
        if (minimumIntegerDigits > maximumIntegerDigits ||
            minimumFractionDigits > maximumFractionDigits ||
            minimumIntegerDigits < 0 || minimumFractionDigits < 0) {
            throw new InvalidObjectException("Digit count range invalid");
        }
        serialVersionOnStream = currentSerialVersion;
    }
View Full Code Here

Examples of java.io.InvalidObjectException

         * @throws InvalidObjectException if the constant could not be resolved.
         * @return resolved NumberFormat.Field constant
         */
        protected Object readResolve() throws InvalidObjectException {
            if (this.getClass() != NumberFormat.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

Examples of java.io.InvalidObjectException

  if (activator instanceof RemoteObject) {
      ref = ((RemoteObject) activator).getRef();
  } else if (Proxy.isProxyClass(activator.getClass())) {
      InvocationHandler handler = Proxy.getInvocationHandler(activator);
      if (!(handler instanceof RemoteObjectInvocationHandler)) {
    throw new InvalidObjectException(
        "unexpected invocation handler");
      }
      ref = ((RemoteObjectInvocationHandler) handler).getRef();
     
  } else {
      throw new InvalidObjectException("unexpected activator type");
  }
  out.writeUTF(ref.getRefClass(out));
  ref.writeExternal(out);
    }
View Full Code Here

Examples of java.io.InvalidObjectException

               new Class<?>[] { Activator.class },
               new RemoteObjectInvocationHandler(ref));

  } catch (InstantiationException e) {
      throw (IOException)
    new InvalidObjectException(
        "Unable to create remote reference").initCause(e);
  } catch (IllegalAccessException e) {
      throw (IOException)
    new InvalidObjectException(
        "Unable to create remote reference").initCause(e);
  }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.