Package java.io

Examples of java.io.ObjectInputStream.readByte()


        ReplicaEventMessage replicaEventMessage = null;

        try
        {
            // The changeType
            byte type = in.readByte();
            ChangeType changeType = ChangeType.getChangeType( type );

            // The Entry's DN
            Dn entryDn = new Dn( schemaManager );
            entryDn.readExternal( in );
View Full Code Here


        try
        {
            Entry entry = new DefaultEntry( schemaManager );

            // Read the Dn, if any
            byte hasDn = in.readByte();

            if ( hasDn == 1 )
            {
                Rdn rdn = new Rdn( schemaManager );
                rdn.readExternal( in );
View Full Code Here

   {
      byte[] bytes = marshaller.objectToByteBuffer(o);
      ObjectInputStream is = ObjectSerializationFactory.createObjectInputStream(bytes);
      short versionShort = is.readShort();
      assertEquals(currentVersionShort, versionShort);
      byte magicNumberFound = is.readByte();
      assertEquals("Magic number mismatch", magicNumber, magicNumberFound);
   }
}
View Full Code Here

   {
      byte[] bytes = marshaller.objectToByteBuffer(o);
      ObjectInputStream is = ObjectSerializationFactory.createObjectInputStream(bytes);
      short versionShort = is.readShort();
      assertEquals(currentVersionShort, versionShort);
      byte magicNumberFound = is.readByte();
      assertEquals("Magic number mismatch", magicNumber, magicNumberFound);
   }
}

class Broken implements Serializable
View Full Code Here

        try
        {
            ParentIdAndRdn parentIdAndRdn = new ParentIdAndRdn();

            // Read the number of rdns, if any
            byte nbRdns = in.readByte();

            if ( nbRdns == 0 )
            {
                parentIdAndRdn.setRdns( new Rdn[0] );
            }
View Full Code Here

                     * if forceToDisk is always true, but might happen if
                     * buffered updates are used.
                     */
                    failure("file corrupted, partial record at " + logBytes);

    int op = in.readByte();

    switch (op) {
      case BOOT_OP:
        long time = in.readLong();
        long sessionId = in.readLong();
View Full Code Here

        //process annotations
        ownerBean = webBeansContext.getBeanManagerImpl().getBeans(beanClass, anns.toArray(new Annotation[anns.size()])).iterator().next();
        qualifierAnnotations = anns;
       
        // determine type of injection point member (0=field, 1=method, 2=constructor) and read...
        int c = in.readByte();
        if(c == 0)
        {
            String fieldName = in.readUTF();
            Field field = webBeansContext.getSecurityService().doPrivilegedGetDeclaredField(beanClass, fieldName);
View Full Code Here

            AnnotatedType<?> annotatedType = annotatedElementFactory.newAnnotatedType(beanClass);
            AnnotatedMethod<Object> am =  (AnnotatedMethod<Object>)annotatedElementFactory.
                                    newAnnotatedMethod((Method) injectionMember,annotatedType);
            List<AnnotatedParameter<Object>> annParameters = am.getParameters();

            annotated = annParameters.get(in.readByte());
            injectionType = annotated.getBaseType();
           
        }
        else if(c == 2)
        {
View Full Code Here

            AnnotatedType<Object> annotatedType = (AnnotatedType<Object>)annotatedElementFactory.newAnnotatedType(beanClass);
            AnnotatedConstructor<Object> am =  annotatedElementFactory
                                            .newAnnotatedConstructor((Constructor<Object>) injectionMember,annotatedType);
            List<AnnotatedParameter<Object>> annParameters = am.getParameters();

            annotated = annParameters.get(in.readByte());
            injectionType = annotated.getBaseType();
        }

        delegate = in.readBoolean();
        transientt = in.readBoolean();
View Full Code Here

          oStream.flush();

          if (iiStream == null)
            iiStream = new ObjectInputStream(iStream);

          iiStream.readByte();
        }
        ooStream.writeInt(0);

        System.out.println("Transferred total MB: " + (float) transferred / 1000000 + " in " + (System.currentTimeMillis() - date)
            + "ms");
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.