Package java.io

Examples of java.io.ObjectInputStream.readByte()


            final ServerMetaData serverMetaData = new ServerMetaData();
            serverMetaData.readExternal(ois);
            ClientObjectFactory.serverMetaData.set(serverMetaData);

            // Read request type
            requestTypeByte = ois.readByte();
            requestType = RequestType.valueOf(requestTypeByte);

            if (requestType == RequestType.NOP_REQUEST) {
                return;
            }
View Full Code Here


                    throw failure;
                }
            }

            requestTypeByte = ois.readByte();
            requestType = RequestType.valueOf(requestTypeByte);

            if (requestType == RequestType.NOP_REQUEST) {
                return;
            }
View Full Code Here

        //process annotations
        this.ownerBean = webBeansContext.getBeanManagerImpl().getBeans(beanClass, anns.toArray(new Annotation[anns.size()])).iterator().next();
        this.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)this.injectionMember ,annotatedType);
            List<AnnotatedParameter<Object>> annParameters = am.getParameters();
           
            this.annotated = annParameters.get(in.readByte());           
            this.injectionType = this.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>)this.injectionMember,annotatedType);
            List<AnnotatedParameter<Object>> annParameters = am.getParameters();
           
            this.annotated = annParameters.get(in.readByte());           
            this.injectionType = this.annotated.getBaseType();
        }
       
        this.delegate = in.readBoolean();
        this.transientt = in.readBoolean();
View Full Code Here

      oos.close();

      ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));

      // test that the first thing on the stream is the fqn!
      byte magic = ois.readByte();
      short ref = ois.readShort();
      System.out.println("Magic number is " + magic);

      assert magic == CacheMarshaller200.MAGICNUMBER_FQN;
View Full Code Here

                     cm200.objectToObjectStream(rrv, outStream);
                     outStream.close();
                     out.close();
                     // test that the output stream has got "/hello" as it's region Fqn.
                     ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(out.toByteArray()));
                     assert in.readByte() == CacheMarshaller200.MAGICNUMBER_FQN : "The stream should start with an Fqn";
                     // discard the nest refId short
                     in.readShort();
                     Fqn f = cm200.unmarshallFqn(in, new UnmarshalledReferences());
                     assert region.equals(f) : "Should use the same region for the response as was used for the request!";
View Full Code Here

                     cm200.objectToObjectStream(true, outStream);
                     outStream.close();
                     out.close();
                     // test that the output stream has got "/hello" as it's region Fqn.
                     ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(out.toByteArray()));
                     byte magic = in.readByte();

                     assert magic != CacheMarshaller200.MAGICNUMBER_FQN : "The stream should NOT start with an Fqn!";
                     assert magic == CacheMarshaller200.MAGICNUMBER_NULL : "Should start with a NULL";
                     assert in.readByte() == CacheMarshaller200.MAGICNUMBER_BOOLEAN : "Should have a boolean magic number before the boolean value";
                     assert in.readBoolean() : "The boolean written to the stream should be true";
View Full Code Here

                     ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(out.toByteArray()));
                     byte magic = in.readByte();

                     assert magic != CacheMarshaller200.MAGICNUMBER_FQN : "The stream should NOT start with an Fqn!";
                     assert magic == CacheMarshaller200.MAGICNUMBER_NULL : "Should start with a NULL";
                     assert in.readByte() == CacheMarshaller200.MAGICNUMBER_BOOLEAN : "Should have a boolean magic number before the boolean value";
                     assert in.readBoolean() : "The boolean written to the stream should be true";

                  }
                  catch (Throwable t)
                  {
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

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.