Package org.apache.commons.io.input

Examples of org.apache.commons.io.input.ReaderInputStream


    ByteArrayOutputStream out = null;
    try
    {
      in = new FileInputStream("test" + File.separator + "input" + File.separator + "ein-pp");
      Reader reader = new InputStreamReader(in, CharsetUtil.forName("x-PICA"));
      InputStream ris = new ReaderInputStream(reader, CharsetUtil.forName("x-PICA"));
      out = new ByteArrayOutputStream();
      remoteExec.processRequest(ris, out);
    }
    catch (FileNotFoundException e)
    {
View Full Code Here


    /**
     * Creates loader for step reader.
     */
    public static Sql fromReader(Reader reader)
    {
        return fromStream(new ReaderInputStream(reader));
    }
View Full Code Here

  */
  @Override
  public String check() throws ManifoldCFException {
    try {
      getSession();
      String responsbody = postData(new ReaderInputStream(new StringReader("[]"),Consts.UTF_8));
      String status = "";
     
      try
      {
        status = getStatusFromJsonResponse(responsbody);
View Full Code Here

   
    // Add the primary content data in.
    fieldReader.addNameValuePair(new JSONNameValueReader(new JSONStringReader(FILE_BODY_TEXT_FIELDNAME),
      new JSONStringReader(new InputStreamReader(document.getBinaryStream(),Consts.UTF_8))));
   
    documentChunkManager.recordDocument(uid, serverHost, serverPath, new ReaderInputStream(objectReader, Consts.UTF_8));
    conditionallyFlushDocuments();
    return DOCUMENTSTATUS_ACCEPTED;
  }
View Full Code Here

    objectReader.addNameValuePair(new JSONNameValueReader(new JSONStringReader("id"),new JSONStringReader(uid)))
      .addNameValuePair(new JSONNameValueReader(new JSONStringReader("type"),new JSONStringReader("delete")));

    try
    {
      documentChunkManager.recordDocument(uid, serverHost, serverPath, new ReaderInputStream(objectReader, Consts.UTF_8));
    }
    catch (IOException e)
    {
      handleIOException(e);
    }
View Full Code Here

        {
          arrayReader.addArrayElement(new JSONValueReader(new InputStreamReader(dr.getDataStream(),Consts.UTF_8)));
        }
       
        //post data..
        String responsbody = postData(new ReaderInputStream(arrayReader,Consts.UTF_8));
        // check status
        String status = getStatusFromJsonResponse(responsbody);
        if("success".equals(status))
        {
          Logging.ingest.info("AmazonCloudSearch: Successfully sent document chunk " + chunkNumber);
View Full Code Here

    public String getName() {
        return null;
    }

    public InputStream getInputStream() throws IOException {
        return new ReaderInputStream(ElementHelper.getTextAsStream(element, true), charset);
    }
View Full Code Here

        }
        if (charset == null) {
            charset = MessageContext.DEFAULT_CHAR_SET_ENCODING;
        }
        messageContext.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING, charset);       
        return processDocument(new ReaderInputStream(reader, charset), contentType,
                messageContext);
    }
View Full Code Here

  @Override
  public void process(final Resource resource, final Reader reader, final Writer writer)
      throws IOException {
    final OutputStream out = new WriterOutputStream(writer);
    final InputStream in = new ReaderInputStream(reader);

    try {
      doProcess(in, out);
    } catch (final IOException ex) {
      final String resourceUri = resource == null ? StringUtils.EMPTY : "[" + resource.getUri() + "]";
View Full Code Here

    @Override
    public InputStream getResourceAsStream(TemplateProcessingParameters theTemplateProcessingParameters, String theName) {
      String template = myNameToNarrativeTemplate.get(theName);
      if (template == null) {
        ourLog.info("No narative template for resource profile: {}", theName);
        return new ReaderInputStream(new StringReader(""));
      }
      return new ReaderInputStream(new StringReader(template));
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.io.input.ReaderInputStream

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.