Examples of writeUTF()


Examples of java.io.DataOutputStream.writeUTF()

   {
      long hash = 0;
      ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream(512);
      MessageDigest messagedigest = MessageDigest.getInstance("SHA");
      DataOutputStream dataoutputstream = new DataOutputStream(new DigestOutputStream(bytearrayoutputstream, messagedigest));
      dataoutputstream.writeUTF(methodDesc);
      dataoutputstream.flush();
      byte abyte0[] = messagedigest.digest();
      for (int j = 0; j < Math.min(8, abyte0.length); j++)
         hash += (long) (abyte0[j] & 0xff) << j * 8;
      return hash;
View Full Code Here

Examples of java.io.DataOutputStream.writeUTF()

    URLConnection c = getConnection(url);
   
    // open a stream which can write to the url
    DataOutputStream dstream = new DataOutputStream(c.getOutputStream());

    dstream.writeUTF("ServletCall");
    dstream.flush();
    dstream.close();
   
     // read the output from the URL
    DataInputStream in = new DataInputStream(new BufferedInputStream(c.getInputStream()));
View Full Code Here

Examples of java.io.DataOutputStream.writeUTF()

    URLConnection c = getConnection(url);
   
    // open a stream which can write to the url
    DataOutputStream dstream = new DataOutputStream(c.getOutputStream());

    dstream.writeUTF("ServletCall");
    dstream.flush();
    dstream.close();
   
     // read the output from the URL
    DataInputStream in = new DataInputStream(new BufferedInputStream(c.getInputStream()));
View Full Code Here

Examples of java.io.ObjectOutput.writeUTF()

                // Write the oid to be able to restore the AttributeType when deserializing
                // the attribute
                String oid = attributeType.getOid();

                out.writeUTF( oid );

                // Write the attribute
                attribute.writeExternal( out );
            }
View Full Code Here

Examples of java.io.ObjectOutputStream.writeUTF()

    private void saveProcessInstanceType(MarshallerWriteContext context,
                                         ProcessInstance processInstance,
                                         String processInstanceType) throws IOException {
        ObjectOutputStream stream = context.stream;
        // saves the processInstance type first
        stream.writeUTF( processInstanceType );
    }

    @PreUpdate
    public void update() {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

Examples of java.io.ObjectOutputStream.writeUTF()

                              }
                          } );
        for ( org.drools.runtime.process.ProcessInstance processInstance : processInstances ) {
            stream.writeShort(PersisterEnums.PROCESS_INSTANCE);
            String processType = processInstance.getProcess().getType();
            stream.writeUTF(processType);
            ProcessMarshallerRegistry.INSTANCE.getMarshaller(processType)
              .writeProcessInstance(context, processInstance);
        }
        stream.writeShort( PersisterEnums.END );
    }
View Full Code Here

Examples of java.io.ObjectOutputStream.writeUTF()

    public static void writeWorkItem(MarshallerWriteContext context,
                                     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() );
View Full Code Here

Examples of java.io.ObjectOutputStream.writeUTF()

        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

Examples of java.io.ObjectOutputStream.writeUTF()

    public void writeProcessInstance(MarshallerWriteContext context,
            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) {
View Full Code Here

Examples of java.io.ObjectOutputStream.writeUTF()

        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 {
            stream.writeInt(0);
        }
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.