Examples of readUTF()


Examples of org.drools.common.DroolsObjectInputStream.readUTF()

                            ObjectInputStream ois,
                            byte[] object,
                            ClassLoader classloader) throws IOException,
                                                    ClassNotFoundException {
        DroolsObjectInputStream is = new DroolsObjectInputStream( new ByteArrayInputStream( object ), classloader );
        String canonicalName = is.readUTF();
        Object id = is.readObject();
        EntityManagerFactory emf = (EntityManagerFactory) env.get(EnvironmentName.ENTITY_MANAGER_FACTORY);
        EntityManager em = emf.createEntityManager();
        return em.find(Class.forName(canonicalName), id);
    }
View Full Code Here

Examples of org.drools.core.common.DroolsObjectInput.readUTF()

        this.workingMemoryCounter.set(droolsStream.readInt());

        this.processes = (Map<String, Process>) droolsStream.readObject();
        Class cls = null;
        try {
            cls = droolsStream.getParentClassLoader().loadClass(droolsStream.readUTF());
            this.factHandleFactory = (FactHandleFactory) cls.newInstance();
        } catch (InstantiationException e) {
            DroolsObjectInputStream.newInvalidClassException(cls,
                                                             e);
        } catch (IllegalAccessException e) {
View Full Code Here

Examples of org.drools.core.common.DroolsObjectInputStream.readUTF()

                            ObjectInputStream ois,
                            byte[] object,
                            ClassLoader classloader) throws IOException,
                                                    ClassNotFoundException {
        DroolsObjectInputStream is = new DroolsObjectInputStream( new ByteArrayInputStream( object ), classloader );
        String canonicalName = is.readUTF();
        Object id = is.readObject();

        EntityManager em = getEntityManager();
        return em.find(Class.forName(canonicalName), id);
    }
View Full Code Here

Examples of org.eclipse.jetty.util.ClassLoadingObjectInputStream.readUTF()

        {
            // input stream should not be closed here
            ClassLoadingObjectInputStream ois =  new ClassLoadingObjectInputStream(is);
            for (int i=0; i<size;i++)
            {
                String key = ois.readUTF();
                Object value = ois.readObject();
                session.setAttribute(key,value);
            }
        }
    }
View Full Code Here

Examples of org.elasticsearch.common.io.stream.BytesStreamInput.readUTF()

        assertThat(in.readVInt(), equalTo(2));
        assertThat(in.readLong(), equalTo((long) -3));
        assertThat(in.readVLong(), equalTo((long) 4));
        assertThat((double) in.readFloat(), closeTo(1.1, 0.0001));
        assertThat(in.readDouble(), closeTo(2.2, 0.0001));
        assertThat(in.readUTF(), equalTo("hello"));
        assertThat(in.readUTF(), equalTo("goodbye"));
    }
}
View Full Code Here

Examples of org.elasticsearch.common.io.stream.HandlesStreamInput.readUTF()

        out.writeUTF("else");
        out.writeUTF(higherThresholdValue);
        out.writeUTF(lowerThresholdValue);

        HandlesStreamInput in = new HandlesStreamInput(new BytesStreamInput(bytesOut.copiedByteArray()));
        assertThat(in.readUTF(), equalTo(lowerThresholdValue));
        assertThat(in.readUTF(), equalTo(higherThresholdValue));
        assertThat(in.readInt(), equalTo(1));
        assertThat(in.readUTF(), equalTo("else"));
        assertThat(in.readUTF(), equalTo(higherThresholdValue));
        assertThat(in.readUTF(), equalTo(lowerThresholdValue));
View Full Code Here

Examples of org.exist.storage.io.VariableByteInput.readUTF()

        //read expectations
        expect(mockIs.available()).andReturn(1);
        expect(mockIs.readByte()).andReturn(byteCapture.getValue());
        expect(mockIs.readInt()).andReturn(intCapture.getValue());
        expect(mockIs.readUTF()).andReturn(strCapture.getValue());
        expect(mockIs.available()).andReturn(0);

        replay(mockIs);

        symbolTable.read(mockIs);
View Full Code Here

Examples of org.hornetq.api.core.HornetQBuffer.readUTF()

            int numberDataFiles = input.readInt();

            for (int i = 0; i < numberDataFiles; i++)
            {
               dataFiles.add(input.readUTF());
            }

            int numberNewFiles = input.readInt();

            for (int i = 0; i < numberNewFiles; i++)
View Full Code Here

Examples of org.hornetq.core.client.impl.LargeMessageBufferImpl.readUTF()

      dynamic.writeDouble(d1);
      dynamic.writeFloat(f1);

      LargeMessageBufferImpl readBuffer = splitBuffer(3, dynamic.toByteBuffer().array());

      Assert.assertEquals(str1, readBuffer.readUTF());
      Assert.assertEquals(str2, readBuffer.readString());
      Assert.assertEquals(d1, readBuffer.readDouble());
      Assert.assertEquals(f1, readBuffer.readFloat());
   }
View Full Code Here

Examples of org.hornetq.core.client.impl.LargeMessageControllerImpl.readUTF()

      dynamic.writeDouble(d1);
      dynamic.writeFloat(f1);

      LargeMessageControllerImpl readBuffer = splitBuffer(3, dynamic.toByteBuffer().array());

      Assert.assertEquals(str1, readBuffer.readUTF());
      Assert.assertEquals(str2, readBuffer.readString());
      Assert.assertEquals(d1, readBuffer.readDouble());
      Assert.assertEquals(f1, readBuffer.readFloat());
   }
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.