Examples of createWriter()


Examples of com.google.devtools.moe.client.parser.RepositoryExpression.createWriter()

      return 1;
    }

    Writer destination;
    try {
      destination = toRepoEx.createWriter(context);
    } catch (WritingError e) {
      AppContext.RUN.ui.error(e, "Error writing to repo");
      return 1;
    }
View Full Code Here

Examples of javax.json.JsonWriterFactory.createWriter()

      if (factory == null)
      {
         factory = Json.createWriterFactory(null);
      }
      Charset charset = getCharset(mediaType);
      return factory.createWriter(os, charset);
   }
}
View Full Code Here

Examples of net.lucidviews.geoserver.limb.response.GetLimbsResponseWriterFactory.createWriter()

      if (writerFactory == null)
      {
        throw new ServletException( "Unsupported format '" + getLimbsRequest.getFormat() + "'." );
      }
     
      ILimbWriter writer = writerFactory.createWriter( response );
      writer.write( limbs.listIterator() );
      writer.writeTerminator();
      writer.flush();
    }
    catch (Exception e)
View Full Code Here

Examples of net.sf.flatpack.writer.DelimiterWriterFactory.createWriter()

                DelimiterWriterFactory factory = new DelimiterWriterFactory(delimiter, textQualifier);
                // add coulmns from the keys in the data map as the columns must be known
                for (String key : firstRow.keySet()) {
                    factory.addColumnTitle(key);
                }
                return factory.createWriter(new OutputStreamWriter(stream));
            } else {
                DelimiterWriterFactory factory = new DelimiterWriterFactory(new InputStreamReader(resource.getInputStream()), delimiter, textQualifier);
                return factory.createWriter(new OutputStreamWriter(stream));
            }
        }
View Full Code Here

Examples of net.sf.flatpack.writer.DelimiterWriterFactory.createWriter()

                    factory.addColumnTitle(key);
                }
                return factory.createWriter(new OutputStreamWriter(stream));
            } else {
                DelimiterWriterFactory factory = new DelimiterWriterFactory(new InputStreamReader(resource.getInputStream()), delimiter, textQualifier);
                return factory.createWriter(new OutputStreamWriter(stream));
            }
        }
    }

View Full Code Here

Examples of net.sf.flatpack.writer.DelimiterWriterFactory.createWriter()

                DelimiterWriterFactory factory = new DelimiterWriterFactory(delimiter, textQualifier);
                // add columns from the keys in the data map as the columns must be known
                for (String key : firstRow.keySet()) {
                    factory.addColumnTitle(key);
                }
                return factory.createWriter(new OutputStreamWriter(stream, IOHelper.getCharsetName(exchange)));
            } else {
                InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext().getClassResolver(), getDefinition());
                InputStreamReader reader = new InputStreamReader(is, IOHelper.getCharsetName(exchange));
                DelimiterWriterFactory factory = new DelimiterWriterFactory(reader, delimiter, textQualifier);
                return factory.createWriter(new OutputStreamWriter(stream, IOHelper.getCharsetName(exchange)));
View Full Code Here

Examples of net.sf.flatpack.writer.DelimiterWriterFactory.createWriter()

                return factory.createWriter(new OutputStreamWriter(stream, IOHelper.getCharsetName(exchange)));
            } else {
                InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext().getClassResolver(), getDefinition());
                InputStreamReader reader = new InputStreamReader(is, IOHelper.getCharsetName(exchange));
                DelimiterWriterFactory factory = new DelimiterWriterFactory(reader, delimiter, textQualifier);
                return factory.createWriter(new OutputStreamWriter(stream, IOHelper.getCharsetName(exchange)));
            }
        }
    }

}
View Full Code Here

Examples of net.sf.flatpack.writer.FixedWriterFactory.createWriter()

    private Writer createWriter(Exchange exchange, Map<String, Object> firstRow, OutputStream stream) throws JDOMException, IOException {
        if (isFixed()) {
            Resource resource = getDefinition();
            ObjectHelper.notNull(resource, "resource property");
            FixedWriterFactory factory = new FixedWriterFactory(new InputStreamReader(resource.getInputStream()));
            return factory.createWriter(new OutputStreamWriter(stream));
        } else {
            Resource resource = getDefinition();
            if (resource == null) {
                DelimiterWriterFactory factory = new DelimiterWriterFactory(delimiter, textQualifier);
                // add coulmns from the keys in the data map as the columns must be known
View Full Code Here

Examples of net.sf.flatpack.writer.FixedWriterFactory.createWriter()

                DelimiterWriterFactory factory = new DelimiterWriterFactory(delimiter, textQualifier);
                // add coulmns from the keys in the data map as the columns must be known
                for (String key : firstRow.keySet()) {
                    factory.addColumnTitle(key);
                }
                return factory.createWriter(new OutputStreamWriter(stream));
            } else {
                DelimiterWriterFactory factory = new DelimiterWriterFactory(new InputStreamReader(resource.getInputStream()), delimiter, textQualifier);
                return factory.createWriter(new OutputStreamWriter(stream));
            }
        }
View Full Code Here

Examples of net.sf.flatpack.writer.FixedWriterFactory.createWriter()

                    factory.addColumnTitle(key);
                }
                return factory.createWriter(new OutputStreamWriter(stream));
            } else {
                DelimiterWriterFactory factory = new DelimiterWriterFactory(new InputStreamReader(resource.getInputStream()), delimiter, textQualifier);
                return factory.createWriter(new OutputStreamWriter(stream));
            }
        }
    }

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.