Package java.io

Examples of java.io.ObjectInputStream.readInt()


    try {
      File programConfigFile = new File(Settings.getUserSettingsDirName(),"programConfigurations.dat");
     
      in = new ObjectInputStream(new BufferedInputStream(new FileInputStream(programConfigFile), 0x1000));
     
      in.readInt(); // read version
     
      mAvailableProgramConfigurations = new GlobalPluginProgramFormating[in.readInt()];
     
      for(int i = 0; i < mAvailableProgramConfigurations.length; i++) {
        mAvailableProgramConfigurations[i] = GlobalPluginProgramFormating.load(in);
View Full Code Here


     
      in = new ObjectInputStream(new BufferedInputStream(new FileInputStream(programConfigFile), 0x1000));
     
      in.readInt(); // read version
     
      mAvailableProgramConfigurations = new GlobalPluginProgramFormating[in.readInt()];
     
      for(int i = 0; i < mAvailableProgramConfigurations.length; i++) {
        mAvailableProgramConfigurations[i] = GlobalPluginProgramFormating.load(in);
      }
     
View Full Code Here

        FastByteArrayInputStream in = new FastByteArrayInputStream(b);
        ObjectInputStream oin = new ObjectInputStream(in);

        Assert.assertEquals(student1, oin.readObject());
        Assert.assertEquals(5, oin.readInt());
        Assert.assertEquals(student2, oin.readObject());

        oin.close();
    }
View Full Code Here

        final byte[] b = f.toByteArray();
        FastByteArrayInputStream in = new FastByteArrayInputStream(b);
        ObjectInputStream oin = new ObjectInputStream(in);

        Assert.assertEquals(student1, oin.readObject());
        Assert.assertEquals(5, oin.readInt());

        int size3 = oin.readInt();
        byte[] b3 = new byte[size3];
        oin.read(b3);
        ArrayAssert.assertEquals(b2, b3);
View Full Code Here

        ObjectInputStream oin = new ObjectInputStream(in);

        Assert.assertEquals(student1, oin.readObject());
        Assert.assertEquals(5, oin.readInt());

        int size3 = oin.readInt();
        byte[] b3 = new byte[size3];
        oin.read(b3);
        ArrayAssert.assertEquals(b2, b3);

        FastByteArrayInputStream bis4 = new FastByteArrayInputStream(b3);
View Full Code Here

                      continue;
                    }
                   
                    ois = new ObjectInputStream( socket.getInputStream());
                   
                    ois.readInt()// version
                   
                    String  header = (String)ois.readObject();
                   
                    if ( !header.equals( getHeader())){
                     
View Full Code Here

        processInstance.setProcessId(processId);
        Process process = ruleBase.getProcess(processId);
        if (ruleBase != null) {
            processInstance.setProcess(process);
        }
        processInstance.setState(stream.readInt());
        long nodeInstanceCounter = stream.readLong();
        processInstance.setKnowledgeRuntime(wm.getKnowledgeRuntime());

        int nbSwimlanes = stream.readInt();
        if (nbSwimlanes > 0) {
View Full Code Here

        }
        processInstance.setState(stream.readInt());
        long nodeInstanceCounter = stream.readLong();
        processInstance.setKnowledgeRuntime(wm.getKnowledgeRuntime());

        int nbSwimlanes = stream.readInt();
        if (nbSwimlanes > 0) {
            Context swimlaneContext = ((org.jbpm.process.core.Process) process).getDefaultContext(SwimlaneContext.SWIMLANE_SCOPE);
            SwimlaneContextInstance swimlaneContextInstance = (SwimlaneContextInstance) processInstance.getContextInstance(swimlaneContext);
            for (int i = 0; i < nbSwimlanes; i++) {
                String name = stream.readUTF();
View Full Code Here

        while (stream.readShort() == PersisterEnums.NODE_INSTANCE) {
            readNodeInstance(context, processInstance, processInstance);
        }

        int exclusiveGroupInstances = stream.readInt();
      for (int i = 0; i < exclusiveGroupInstances; i++) {
            ExclusiveGroupInstance exclusiveGroupInstance = new ExclusiveGroupInstance();
            processInstance.addContextInstance(ExclusiveGroup.EXCLUSIVE_GROUP, exclusiveGroupInstance);
            int nodeInstances = stream.readInt();
            for (int j = 0; j < nodeInstances; j++) {
View Full Code Here

        int exclusiveGroupInstances = stream.readInt();
      for (int i = 0; i < exclusiveGroupInstances; i++) {
            ExclusiveGroupInstance exclusiveGroupInstance = new ExclusiveGroupInstance();
            processInstance.addContextInstance(ExclusiveGroup.EXCLUSIVE_GROUP, exclusiveGroupInstance);
            int nodeInstances = stream.readInt();
            for (int j = 0; j < nodeInstances; j++) {
                long nodeInstanceId = stream.readLong();
                NodeInstance nodeInstance = processInstance.getNodeInstance(nodeInstanceId);
                if (nodeInstance == null) {
                  throw new IllegalArgumentException("Could not find node instance when deserializing exclusive group instance: " + nodeInstanceId);
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.