Examples of readValue()


Examples of at.jta.Regor.readValue()

                            List l = regor.listKeys(key);
                            for (Object o : l) {
                                Key openKey = regor.openKey(key, (String) o + "\\InstallPath", Regor.KEY_READ);
                                if (openKey != null) {
                                    try {
                                        byte buf[] = regor.readValue(openKey, "");
                                        if (buf != null) {
                                            String parseValue = Regor.parseValue(buf);
                                            //Ok, this should be the directory where it's installed, try to find a 'python.exe' there...
                                            File file = new File(parseValue, "python.exe");
                                            if (file.isFile()) {
View Full Code Here

Examples of com.badlogic.gdx.utils.Json.readValue()

          }
          ObjectMap<String, ObjectMap> valueMap = (ObjectMap)typeEntry.value;
          for (Entry<String, ObjectMap> valueEntry : valueMap.entries()) {
            try {
              if (isResource)
                addResource(valueEntry.key, json.readValue(type, valueEntry.value));
              else
                addStyle(valueEntry.key, json.readValue(type, valueEntry.value));
            } catch (Exception ex) {
              throw new SerializationException("Error reading " + type.getSimpleName() + ": " + valueEntry.key, ex);
            }
View Full Code Here

Examples of com.cloudera.api.ApiObjectMapper.readValue()

  }

  static <T> T jsonToObject(String text, Class<T> type)
      throws IOException {
    ApiObjectMapper objectMapper = new ApiObjectMapper();
    return objectMapper.readValue(text, type);
  }


  private static <T> void checkJson(Class<? extends T> type, T object)
      throws IOException {
View Full Code Here

Examples of com.dotcms.repackage.org.codehaus.jackson.map.ObjectMapper.readValue()

      String str;
      while ((str = in.readLine()) != null) {
        sw.append(str);
      }

      WorkflowSchemeImportExportObject importer = mapper.readValue((String) sw.toString(), WorkflowSchemeImportExportObject.class);

      for (WorkflowScheme scheme : importer.getSchemes()) {
        wapi.saveScheme(scheme);
      }
      for (WorkflowStep step : importer.getSteps()) {
View Full Code Here

Examples of com.fasterxml.jackson.core.ObjectCodec.readValue()

    if (codec == null) {
      throw new IllegalStateException("Could not parse embedded document " +
          "because BSON parser has no codec");
    }
    _currToken = handleNewDocument(false);
    return codec.readValue(this, new TypeReference<Map<String, Object>>() {});
  }
 
  /**
   * @return the context of the current element
   * @throws IOException if there is no context
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectMapper.readValue()

    ObjectMapper om = new ObjectMapper(new YAMLFactory());
    FileInputStream fis;
    try {
      fis = new FileInputStream(args[1]);
      // Stream will be closed on completion
      this.configuration = om.readValue(fis, SiteConfiguration.class);
    } catch (IOException e) {
      throw new IllegalArgumentException("Cannot read external configuration from '"+args[1]+"'",e);
    }
  }
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectReader.readValue()

    public void testContainer() throws IOException {
        final Fixture expected = new Fixture();
        final String str = writer.writeValueAsString(expected);
        Assert.assertTrue(str.contains("DEBUG"));
        final ObjectReader fixtureReader = log4jObjectMapper.reader(Fixture.class);
        final Fixture actual = fixtureReader.readValue(str);
        Assert.assertEquals(expected, actual);
    }

    @Test
    public void testNameOnly() throws IOException {
View Full Code Here

Examples of com.fasterxml.jackson.dataformat.xml.XmlMapper.readValue()

        try {
            InputStream in = new URL("http://localhost:"+TEST_PORT+"/point").openStream();
            byte[] bytes = readAll(in);
            in.close();
            xml = new String(bytes, "UTF-8");
            p = mapper.readValue(xml, Point.class);
        } finally {
            server.stop();
        }
        // ensure we got a valid Point
        assertNotNull(p);
View Full Code Here

Examples of com.netflix.suro.jackson.DefaultObjectMapper.readValue()

                    return null;
                }
            }
        });

        Sink esSink = jsonMapper.readValue(desc, new TypeReference<Sink>(){});
        assertTrue(esSink instanceof ElasticSearchSink);
    }

    @Test
    public void testRecover() throws JsonProcessingException {
View Full Code Here

Examples of com.noelios.restlet.util.HeaderReader.readValue()

            for (Parameter header : getRequestHeaders()) {
                if (header.getName().equalsIgnoreCase(
                        HttpConstants.HEADER_CONTENT_ENCODING)) {
                    HeaderReader hr = new HeaderReader(header.getValue());
                    String value = hr.readValue();
                    while (value != null) {
                        Encoding encoding = Encoding.valueOf(value);
                        if (!encoding.equals(Encoding.IDENTITY)) {
                            result.getEncodings().add(encoding);
                        }
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.