Examples of StringOutputStream


Examples of com.pugh.sockso.web.StringOutputStream

    private final OutputStream out;
   
    public MyHttpURLConnection( final String data ) {
        super( null );
        this.data = data;
        this.out = new StringOutputStream();
    }
View Full Code Here

Examples of edu.stanford.nlp.io.StringOutputStream

  }

  public static String getConllEvalSummary(String conllMentionEvalScript,
      String goldFile, String predictFile) throws IOException {
    ProcessBuilder process = new ProcessBuilder(conllMentionEvalScript, "all", goldFile, predictFile, "none");
    StringOutputStream errSos = new StringOutputStream();
    StringOutputStream outSos = new StringOutputStream();
    PrintWriter out = new PrintWriter(outSos);
    PrintWriter err = new PrintWriter(errSos);
    SystemUtils.run(process, out, err);
    out.close();
    err.close();
    String summary = outSos.toString();
    String errStr = errSos.toString();
    if ( ! errStr.isEmpty()) {
      summary += "\nERROR: " + errStr;
    }
    Pattern pattern = Pattern.compile("\\d+\\.\\d\\d\\d+");
View Full Code Here

Examples of edu.stanford.nlp.io.StringOutputStream

*/
public class XMLUtils {
  private static Document document = createDocument();

  public static String documentToString(Document document) {
    StringOutputStream s = new StringOutputStream();
    printNode(s, document, true, true);
    return s.toString();
  }
View Full Code Here

Examples of edu.stanford.nlp.io.StringOutputStream

    printNode(s, document, true, true);
    return s.toString();
  }

  public static String nodeToString(Node node, boolean prettyPrint) {
    StringOutputStream s = new StringOutputStream();
    printNode(s, node, prettyPrint, false);
    return s.toString();
  }
View Full Code Here

Examples of edu.stanford.nlp.io.StringOutputStream

   * @return string representing scored parses
   */
  public String parsesToString(List<ScoredObject<Tree>> parses)
  {
    if (parses == null) return null;
    StringOutputStream os = new StringOutputStream();
    PrintWriter pw = new PrintWriter(os);
    printScoredTrees(pw, 0, parses);
    pw.close();
    return os.toString();
  }
View Full Code Here

Examples of jodd.io.StringOutputStream

      if (body != null) {
        removeHeader(HEADER_CONTENT_ENCODING);
        try {
          StringInputStream in = new StringInputStream(body, StringInputStream.Mode.STRIP);
          GZIPInputStream gzipInputStream = new GZIPInputStream(in);
          StringOutputStream out = new StringOutputStream(StringPool.ISO_8859_1);

          StreamUtil.copy(gzipInputStream, out);

          body(out.toString());
        } catch (IOException ioex) {
          throw new HttpException(ioex);
        }
      }
    }
View Full Code Here

Examples of org.apache.felix.ipojo.junit4osgi.plugin.StringOutputStream

   
    /**
     * Creates the log service object.
     */
    public LogServiceImpl() {
        m_defaultStream = new StringOutputStream();
    }
View Full Code Here

Examples of org.apache.felix.ipojo.junit4osgi.plugin.StringOutputStream

  
    /**
     * Enables the log messages collection.
     */
    public void enableOutputStream() {
        m_outputStream = new StringOutputStream();
    }
View Full Code Here

Examples of org.codehaus.plexus.util.StringOutputStream

    public StreamKnownHostsProvider( InputStream stream )
        throws IOException
    {
        try
        {
            StringOutputStream stringOutputStream = new StringOutputStream();
            IOUtil.copy( stream, stringOutputStream );
            this.contents = stringOutputStream.toString();
           
            this.knownHosts = this.loadKnownHosts( this.contents );
        }
        finally
        {
View Full Code Here

Examples of org.codehaus.plexus.util.StringOutputStream

    }

    public void fillOutputData( OutputData outputData )
        throws TransferFailedException
    {
        outputData.setOutputStream( new StringOutputStream() );
    }
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.