Package java.io

Examples of java.io.ObjectOutputStream.writeInt()


        FastByteArrayOutputStream f = new FastByteArrayOutputStream();

        ObjectOutputStream out = new ObjectOutputStream(f);
        Student student1 = new Student("Chris", "Giroir", "111111", "elkfjwe", "wifjew");
        out.writeObject(student1);
        out.writeInt(5);
        out.close();

        out = new NoHeaderObjectOutputStream(f);
        Student student2 = new Student("Chris2", "Giroir2", "elkfjwe", "111111");
        out.writeObject(student2);
View Full Code Here


        FastByteArrayOutputStream f = new FastByteArrayOutputStream();

        ObjectOutputStream out = new ObjectOutputStream(f);
        Student student1 = new Student("Chris", "Giroir", "111111", "elkfjwe", "wifjew");
        out.writeObject(student1);
        out.writeInt(5);

        FastByteArrayOutputStream out2 = new FastByteArrayOutputStream();
        ObjectOutputStream oos2 = new ObjectOutputStream(out2);
        Student student2 = new Student("Chris2", "Giroir2", "elkfjwe", "111111");
        Student student3 = new Student("dsfsfsd", "sasa", "DSsd", "sds");
View Full Code Here

    try{
      socket = new Socket( "127.0.0.1", port );
          
      ObjectOutputStream  oos = new ObjectOutputStream( socket.getOutputStream());
     
      oos.writeInt( 0 );
     
      oos.writeObject( getHeader());
     
      oos.writeObject( args );
     
View Full Code Here

                                     WorkItem workItem, boolean includeVariables) throws IOException {
        ObjectOutputStream stream = context.stream;
        stream.writeLong( workItem.getId() );
        stream.writeLong( workItem.getProcessInstanceId() );
        stream.writeUTF( workItem.getName() );
        stream.writeInt( workItem.getState() );

        if(includeVariables){
          Map<String, Object> parameters = workItem.getParameters();
          stream.writeInt( parameters.size() );
          for ( Map.Entry<String, Object> entry : parameters.entrySet() ) {
View Full Code Here

        stream.writeUTF( workItem.getName() );
        stream.writeInt( workItem.getState() );

        if(includeVariables){
          Map<String, Object> parameters = workItem.getParameters();
          stream.writeInt( parameters.size() );
          for ( Map.Entry<String, Object> entry : parameters.entrySet() ) {
              stream.writeUTF( entry.getKey() );
              stream.writeObject( entry.getValue() );
          }
      }
View Full Code Here

            ProcessInstance processInstance) throws IOException {
        WorkflowProcessInstanceImpl workFlow = (WorkflowProcessInstanceImpl) processInstance;
        ObjectOutputStream stream = context.stream;
        stream.writeLong(workFlow.getId());
        stream.writeUTF(workFlow.getProcessId());
        stream.writeInt(workFlow.getState());
        stream.writeLong(workFlow.getNodeInstanceCounter());

        SwimlaneContextInstance swimlaneContextInstance = (SwimlaneContextInstance) workFlow.getContextInstance(SwimlaneContext.SWIMLANE_SCOPE);
        if (swimlaneContextInstance != null) {
            Map<String, String> swimlaneActors = swimlaneContextInstance.getSwimlaneActors();
View Full Code Here

        stream.writeLong(workFlow.getNodeInstanceCounter());

        SwimlaneContextInstance swimlaneContextInstance = (SwimlaneContextInstance) workFlow.getContextInstance(SwimlaneContext.SWIMLANE_SCOPE);
        if (swimlaneContextInstance != null) {
            Map<String, String> swimlaneActors = swimlaneContextInstance.getSwimlaneActors();
            stream.writeInt(swimlaneActors.size());
            for (Map.Entry<String, String> entry : swimlaneActors.entrySet()) {
                stream.writeUTF(entry.getKey());
                stream.writeUTF(entry.getValue());
            }
        } else {
View Full Code Here

        stream.writeShort(PersisterEnums.END);
       
        List<ContextInstance> exclusiveGroupInstances =
          workFlow.getContextInstances(ExclusiveGroup.EXCLUSIVE_GROUP);
        if (exclusiveGroupInstances == null) {
          stream.writeInt(0);
        } else {
          stream.writeInt(exclusiveGroupInstances.size());
          for (ContextInstance contextInstance: exclusiveGroupInstances) {
            ExclusiveGroupInstance exclusiveGroupInstance = (ExclusiveGroupInstance) contextInstance;
            Collection<NodeInstance> groupNodeInstances = exclusiveGroupInstance.getNodeInstances();
View Full Code Here

        List<ContextInstance> exclusiveGroupInstances =
          workFlow.getContextInstances(ExclusiveGroup.EXCLUSIVE_GROUP);
        if (exclusiveGroupInstances == null) {
          stream.writeInt(0);
        } else {
          stream.writeInt(exclusiveGroupInstances.size());
          for (ContextInstance contextInstance: exclusiveGroupInstances) {
            ExclusiveGroupInstance exclusiveGroupInstance = (ExclusiveGroupInstance) contextInstance;
            Collection<NodeInstance> groupNodeInstances = exclusiveGroupInstance.getNodeInstances();
            stream.writeInt(groupNodeInstances.size());
            for (NodeInstance nodeInstance: groupNodeInstances) {
View Full Code Here

        } else {
          stream.writeInt(exclusiveGroupInstances.size());
          for (ContextInstance contextInstance: exclusiveGroupInstances) {
            ExclusiveGroupInstance exclusiveGroupInstance = (ExclusiveGroupInstance) contextInstance;
            Collection<NodeInstance> groupNodeInstances = exclusiveGroupInstance.getNodeInstances();
            stream.writeInt(groupNodeInstances.size());
            for (NodeInstance nodeInstance: groupNodeInstances) {
              stream.writeLong(nodeInstance.getId());
            }
          }
        }
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.