Package co.cask.tigon.internal.io

Examples of co.cask.tigon.internal.io.ReflectionSchemaGenerator


   * instantiate an object of type outputClass
   */
  public POJOCreator(Class<?> outputClass, Schema schema) throws UnsupportedTypeException {
    this.schema = schema;
    this.outputClass = outputClass;
    this.outputGenerator = new ReflectionDatumReader(new ReflectionSchemaGenerator().generate(outputClass, false),
                                                     TypeToken.of(outputClass));
  }
View Full Code Here


  private static InputSupplier<InputStream> getInputSupplier(final FlowSpecification flowSpec) {
    return new InputSupplier<InputStream>() {
      @Override
      public InputStream getInput() throws IOException {
        String json = FlowSpecificationAdapter.create(new ReflectionSchemaGenerator()).toJson(flowSpec);
        return new ByteArrayInputStream(json.getBytes(Charsets.UTF_8));
      }
    };
  }
View Full Code Here

TOP

Related Classes of co.cask.tigon.internal.io.ReflectionSchemaGenerator

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.