Package org.fudgemsg.mapping

Examples of org.fudgemsg.mapping.FudgeObjectReader


    byte[] bytes = text.getBytes(Charsets.UTF_8);
    return bytes;
  }

  protected <R> R convertBytesToConfigurationObject(Class<R> clazz, byte[] dataAsBytes) {
    FudgeObjectReader objectReader = getFudgeContext().createObjectReader(new ByteArrayInputStream(dataAsBytes));
    R object = objectReader.read(clazz);
    return object;
  }
View Full Code Here


    } catch (ClassNotFoundException ex) {
      throw new OpenGammaRuntimeException("No class available with name " + className + " for decoding.", ex);
    }
   
    ByteArrayInputStream bais = new ByteArrayInputStream(data);
    FudgeObjectReader objectReader = fudgeContext.createObjectReader(bais);
    Security security = (Security) objectReader.read(clazz);
    return security;
  }
View Full Code Here

      } catch (ClassNotFoundException ex) {
        s_logger.warn("ConfigType: {} class can not be found for docOid: {}", configType, docOid);
        return;
      }

      FudgeObjectReader objReader = s_fudgeContext.createObjectReader(new ByteArrayInputStream(bytes));
      FudgeMsg fudgeMsg = objReader.getMessageReader().nextMessage();
      try {

        FudgeDeserializer deserializer = new FudgeDeserializer(s_fudgeContext);
        Object configObj = deserializer.fudgeMsgToObject(reifiedType, fudgeMsg);
        ConfigItem<?> item = ConfigItem.of(configObj);
View Full Code Here

TOP

Related Classes of org.fudgemsg.mapping.FudgeObjectReader

Copyright © 2018 www.massapicom. 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.