Examples of deserialize()


Examples of org.apache.zookeeper_voltpatches.server.persistence.FileHeader.deserialize()

     * @throws IOException
     */
    public void deserialize(DataTree dt, Map<Long, Long> sessions,
            InputArchive ia) throws IOException {
        FileHeader header = new FileHeader();
        header.deserialize(ia, "fileheader");
        if (header.getMagic() != SNAP_MAGIC) {
            throw new IOException("mismatching magic headers "
                    + header.getMagic() +
                    " !=  " + FileSnap.SNAP_MAGIC);
        }
View Full Code Here

Examples of org.axonframework.serializer.Serializer.deserialize()

    @Before
    public void setUp() {
        mockDomainEvent = mock(DomainEventMessage.class);
        Serializer mockSerializer = mock(Serializer.class);
        MetaData metaData = new MetaData(Collections.singletonMap("Key", "Value"));
        when(mockSerializer.deserialize(mockPayload)).thenReturn("Payload");
        when(mockSerializer.deserialize(isA(SerializedMetaData.class))).thenReturn(metaData);
    }

    @Test
    public void testDomainEventEntry_WrapEventsCorrectly() {
View Full Code Here

Examples of org.axonframework.serializer.xml.XStreamSerializer.deserialize()

        assertEquals(1, deserialized2.getUncommittedEventCount());
    }

    private AggregateRoot deserialized(ByteArrayOutputStream baos) {
        XStreamSerializer serializer = new XStreamSerializer();
        return (AggregateRoot) serializer.deserialize(new SimpleSerializedObject<byte[]>(baos.toByteArray(),
                                                                                         byte[].class,
                                                                                         "ignored",
                                                                                         "0"));
    }
View Full Code Here

Examples of org.broad.igv.data.seg.SegmentedChromosomeData.deserialize()

        stream.flush();
        stream.close();

        SegmentedChromosomeData copy = new SegmentedChromosomeData();
        InputStream is = new FileInputStream(testFile);
        copy.deserialize(is);
        is.close();

        String[] expectedSamples = testData.getSampleNames();
        String[] samples = copy.getSampleNames();
        assertEquals(expectedSamples.length, samples.length);
View Full Code Here

Examples of org.butor.json.JsonHelper.deserialize()

    setMember(cra.getUserId());

    Firm firm = queryFirst(PROC_READ_FIRM, readSql, Firm.class, args, cra, authDataCrit);
    if (firm != null && !Strings.isNullOrEmpty(firm.getAttributes())) {
      JsonHelper jsh = new JsonHelper();
      firm.setAttributesMap(jsh.deserialize(firm.getAttributes(), Map.class));
    }
    return firm;
  }
  private Firm readFirm(long firmId, CommonRequestArgs cra) {
    return readFirm(firmId, null, null, null, cra);
View Full Code Here

Examples of org.caffinitas.mapper.core.codec.TypeCodec.deserialize()

                ByteBuffer name = s.duplicate();
                int e = s.position() + alias;
                name.limit(e);
                s.position(e);
                TypeCodec codec = TypeCodec.utf8Instance;
                String typeStr = (String) codec.deserialize(name);
                dataType = CassandraTypeParser.parseOne(protocolVersion, typeStr);
            }

            // read component value
            if (s.remaining() < 2) {
View Full Code Here

Examples of org.codehaus.jackson.map.deser.SettableBeanProperty.deserialize()

            }
            // creator property?
            SettableBeanProperty prop = creator.findCreatorProperty(propName);
            if (prop != null) {
                // Last property to set?
                Object value = prop.deserialize(jp, ctxt);
                if (buffer.assignParameter(prop.getPropertyIndex(), value)) {
                    jp.nextToken();
                    Map<Object,Object> result;
                    try {
                        result = (Map<Object,Object>)creator.build(buffer);
View Full Code Here

Examples of org.commoncrawl.rpc.RPCStruct.deserialize()

      LOG.info(_fqName + " QueryId:" + rpcContext.getInput().getCommonInfo().getQueryId() + " DeSerializing Query Data");
      // allocate an input stream 
      DataInputBuffer inputStream = new DataInputBuffer();
      inputStream.reset(rpcContext.getInput().getQueryDataBuffer().getReadOnlyBytes(),0,rpcContext.getInput().getQueryDataBuffer().getCount());
      // and deserialize into the structure
      queryData.deserialize(inputStream,new BinaryProtocol());
      LOG.info(_fqName + " QueryId:" + rpcContext.getInput().getCommonInfo().getQueryId() + " Allocating QueryOp Object of type:" + queryObjectType);
      // allocate query object
      Query queryObject = createQueryObjectGivenType(queryObjectType,rpcContext.getInput().getShardId(),queryData);
      LOG.info(_fqName + " QueryId:" + rpcContext.getInput().getCommonInfo().getQueryId() + " Initializing QueryObject");
      // initialize query
View Full Code Here

Examples of org.commoncrawl.rpc.UnitTestStruct1.deserialize()

    assertTrue(incomingFrame._method.equals("testMethod"));
    assertTrue(incomingFrame._requestId == 10);
    assertTrue(incomingFrame._type == RPCFrame.MSG_TYPE.REQUEST.ordinal());

    // deserialize the input struct
    outputStruct.deserialize(new DataInputStream(incomingFrame._payload),
        new BinaryProtocol());

    // validate values of deserialized struct against original (input) struct

    assertTrue(outputStruct.getIntType() == inputStruct.getIntType());
View Full Code Here

Examples of org.dcm4che3.conf.api.generic.ReflectiveConfig.ConfigTypeAdapter.deserialize()

            // find typeadapter
            ConfigTypeAdapter customRep = config.lookupTypeAdapter(classField.getType());

            if (customRep != null) {
                try {
                    Object value = customRep.deserialize(serialized.get(fieldAnno.name()), config, classField);

                    // set using a setter, exception is when failIfNotPresent is false and there were no value
                    if (value != null || fieldAnno.failIfNotPresent())
                        PropertyUtils.setSimpleProperty(confObj, classField.getName(), value);
                } catch (Exception e) {
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.