Package java.io

Examples of java.io.ObjectInputStream.readShort()


      int versionId;
      ObjectInputStream in = new MarshalledValueInputStream(new ByteArrayInputStream(buf));

      try
      {
         versionId = in.readShort();
         if (trace) log.trace("Read version " + versionId);
      }
      catch (Exception e)
      {
         log.error("Unable to read version id from first two bytes of stream, barfing.");
View Full Code Here


         ObjectInputStream in = new MarshalledValueInputStream(is);

         try
         {
            versionId = in.readShort();
            if (trace) log.trace("Read version " + versionId);
         }
         catch (Exception e)
         {
            log.error("Unable to read version id from first two bytes of stream, barfing.");
View Full Code Here

        String value = stream.readUTF();
        swimlaneContextInstance.setActorId(name, value);
      }
    }

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

    processInstance.internalSetNodeInstanceCounter(nodeInstanceCounter);
    if (wm != null) {
View Full Code Here

                swimlaneContextInstance.setActorId( name,
                                                    value );
            }
        }

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

      NodeInstanceContainer nodeInstanceContainer,
      WorkflowProcessInstance processInstance) throws IOException {
    ObjectInputStream stream = context.stream;
    long id = stream.readLong();
    long nodeId = stream.readLong();
    int nodeType = stream.readShort();
    NodeInstanceImpl nodeInstance = readNodeInstanceContent(nodeType,
        stream, context, processInstance);

    nodeInstance.setNodeId(nodeId);
    nodeInstance.setNodeInstanceContainer(nodeInstanceContainer);
View Full Code Here

      int versionId;
      ObjectInputStream in = new MarshalledValueInputStream(new ByteArrayInputStream(bytes, offset, len));

      try
      {
         versionId = in.readShort();
         if (trace) log.trace("Read version " + versionId);
      }
      catch (Exception e)
      {
         log.error("Unable to read version id from first two bytes of stream, barfing.");
View Full Code Here

      int versionId;
      ObjectInputStream in = new MarshalledValueInputStream(new ByteArrayInputStream(buf));

      try
      {
         versionId = in.readShort();
         if (trace) log.trace("Read version " + versionId);
      }
      catch (Exception e)
      {
         log.error("Unable to read version id from first two bytes of stream, barfing.");
View Full Code Here

         ObjectInputStream in = new MarshalledValueInputStream(is);

         try
         {
            versionId = in.readShort();
            if (trace) log.trace("Read version " + versionId);
         }
         catch (Exception e)
         {
            log.error("Unable to read version id from first two bytes of stream, barfing.");
View Full Code Here

   {
      VersionAwareMarshaller marshaller = createVAMandRestartCache(Version.getVersionString(Version.getVersionShort()));

      byte[] bytes = marshaller.objectToByteBuffer("Hello");
      ObjectInputStream in = new MarshalledValueInputStream(new ByteArrayInputStream(bytes));
      assertEquals("Version header short should be '30'", 30, in.readShort());
   }

   public void testVersionHeader210() throws Exception
   {
      VersionAwareMarshaller marshaller = createVAMandRestartCache("2.1.0.GA");
View Full Code Here

   {
      VersionAwareMarshaller marshaller = createVAMandRestartCache("2.1.0.GA");

      byte[] bytes = marshaller.objectToByteBuffer("Hello");
      ObjectInputStream in = new MarshalledValueInputStream(new ByteArrayInputStream(bytes));
      assertEquals("Version header short should be '21'", 21, in.readShort());
   }

   public void testVersionHeader200() throws Exception
   {
      VersionAwareMarshaller marshaller = createVAMandRestartCache("2.0.0.GA");
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.