Package java.io

Examples of java.io.StreamCorruptedException


      {
         initialize(className, typeName, description);
      }
      catch (OpenDataException e)
      {
         throw new StreamCorruptedException("The object read from the ObjectInputStream during deserialization is not valid");
      }
   }
View Full Code Here


         validate(getTypeName(), getDescription(), itemNames, itemDescriptions, itemTypes);
         initialize(itemNames, itemDescriptions, itemTypes);
      }
      catch (OpenDataException e)
      {
         throw new StreamCorruptedException("validation failed for deserialized object, unable to create object in the correct state");
      }
   }
View Full Code Here

      ObjectInputStream.GetField fields = in.readFields();

      Vector vector = (Vector)fields.get(serialName, null);
      if (fields.defaulted(serialName))
      {
         throw new StreamCorruptedException("Serialized stream corrupted: expecting a non-null Vector");
      }

      if (enabledAttributes == null) enabledAttributes = new HashSet();
      enabledAttributes.clear();
      enabledAttributes.addAll(vector);
View Full Code Here

    @Override
    protected void readStreamHeader() throws IOException,
            StreamCorruptedException {
        int version = readByte() & 0xFF;
        if (version != STREAM_VERSION) {
            throw new StreamCorruptedException(
                    "Unsupported version: " + version);
        }
    }
View Full Code Here

        case CompactObjectOutputStream.TYPE_THIN_DESCRIPTOR:
            String className = readUTF();
            Class<?> clazz = loadClass(className);
            return ObjectStreamClass.lookup(clazz);
        default:
            throw new StreamCorruptedException(
                    "Unexpected class descriptor type: " + type);
        }
    }
View Full Code Here

   */
  protected Object readResolve() throws ObjectStreamException {
    Object par = allParameters.get(makeKey(name));
   
    if(par == null)
      throw new StreamCorruptedException("Unknown parameter value: " + name);
     
    return par;
  }
View Full Code Here

   */
  protected Object readResolve() throws ObjectStreamException {
    Object par = allParameters.get(makeKey(name));
   
    if(par == null)
      throw new StreamCorruptedException("Unknown parameter value: " + name);
     
    return par;
  }
View Full Code Here

     */
    public ObjectOutput getResultStream(boolean success)
            throws IOException, StreamCorruptedException {
        if (hasResStream) {
            // rmi.7A=getResultStream() method has already been called.
            throw new StreamCorruptedException(Messages.getString("rmi.7A")); //$NON-NLS-1$
        }
        (new DataOutputStream(conn.getOutputStream())).writeByte(CALL_OK);

        if (oout == null) {
            oout = new RMIObjectOutputStream(conn.getOutputStream(), true);
View Full Code Here

                        String className = readUTF();
                        Class<?> clazz = Class.forName(className, true,
                                classLoader);
                        return ObjectStreamClass.lookup(clazz);
                    default:
                        throw new StreamCorruptedException(
                                "Unexpected class descriptor type: " + type);
                    }
                }

                @Override
View Full Code Here

                    // Make sure we always put back what we have read.
                    // If this throws an IOException then the current
                    // stream should be closed an reopend by the registry.
                    is.reset();
                } catch (IOException ioe) {
                    throw new StreamCorruptedException(ioe.getMessage());
                }
            }
            return true;
        }
View Full Code Here

TOP

Related Classes of java.io.StreamCorruptedException

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.