Examples of FileWriter


Examples of java.io.FileWriter

    private static Writer getOverallSummaryErrorsStream(String outputDir)
    throws IOException {
  boolean exists = false;
  File summaryFile = new File(outputDir, OVERALL_SUMMARY_ERROR_FILE); //$NON-NLS-1$
  exists = summaryFile.exists();
  FileWriter fstream = new FileWriter(summaryFile,true);
        BufferedWriter out = new BufferedWriter(fstream);

        if (!exists) {

            try {
View Full Code Here

Examples of java.io.FileWriter

    }

  private void writeResultSet(File expected, BufferedReader resultReader)
      throws IOException {
    if (WRITE_ACTUAL) {
      BufferedWriter bw = new BufferedWriter(new FileWriter(expected));
      String s = null;
      while ((s = resultReader.readLine()) != null) {
        bw.write(s);
        bw.write("\n"); //$NON-NLS-1$
      }
View Full Code Here

Examples of java.io.FileWriter

     * Saves the pattern as a text file
     * @param filename the filename to save under
     */
    public void savePattern(File file) throws IOException
    {
        BufferedWriter out = new BufferedWriter(new FileWriter(file));
        if ((getProperties().size() > 0) || (getTitle() != null)) {
            out.write("#\n");
            if (getTitle() != null) {
                out.write("# ");
                out.write("Title: ");
View Full Code Here

Examples of java.io.FileWriter

    static Writer out;

    static private void outRules(String name) throws IOException {
        count = 0;
        // if (true) throw new RuntimeException();
        out = new FileWriter("src/com/hp/hpl/jena/iri/impl/"+name+".jflex");
        copy("src/com/hp/hpl/jena/iri/impl/iri.jflex");
        out.write("%class Lexer");
        out.write(name.substring(0, 1).toUpperCase());
        out.write(name.substring(1));
        out.write("\n%%\n");
View Full Code Here

Examples of java.io.FileWriter

        String jflexFile = "src/com/hp/hpl/jena/iri/impl/"+name+".jflex";
       
        if (name.equals("scheme")|| name.equals("port")) {
           
        } else {
            out = new FileWriter("tmp.jflex");
            copy(jflexFile);
            jflexFile = "tmp.jflex";
            copy("src/com/hp/hpl/jena/iri/impl/xchar.jflex");
            out.close();
        }
View Full Code Here

Examples of java.io.FileWriter

    }

    public PublishArtifact writePom(final File pomFile) {
        try {
            pomFile.getParentFile().mkdirs();
            FileWriter writer = new FileWriter(pomFile);
            try {
                getPom().writeTo(writer);
            } finally {
                writer.close();
            }
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
View Full Code Here

Examples of java.io.FileWriter

        properties.setProperty( Index.PropertyKeys.PAYLOADCLASS, payload.getClass().getName() );
        if ( field != null ) properties.setProperty( Index.PropertyKeys.FIELD, field );
        properties.save( batchBasename + DiskBasedIndex.PROPERTIES_EXTENSION );

        // We *must* generate a fake term file, or index combination won't work.
        final PrintWriter termWriter = new PrintWriter( new FileWriter( batchBasename + DiskBasedIndex.TERMS_EXTENSION ) );
        termWriter.println( "#" );
        termWriter.close();

        cutPoints.add( cutPoints.getInt( cutPoints.size() - 1 ) + documentCount );
        accumulatorStream.reset();
View Full Code Here

Examples of net.sf.laja.parser.engine2.FileWriter

  public DefaultSyntaxErrorHandler(String logfile) {
    if (logfile == null) {
      writer = new PrintWriter();
    } else {
      fileWriter = new FileWriter(logfile);
      writer = new MultiWriter(new PrintWriter(), fileWriter);
    }
  }
View Full Code Here

Examples of org.apache.axis2.wsdl.codegen.writer.FileWriter

    protected void writeBuildScript() throws Exception {
        if (this.codeGenConfiguration.isGenerateDeployementDescriptor()) {

            // Write the service xml in a folder with the
            Document buildXMLModel = createDOMDocumentForBuildScript(this.codeGenConfiguration);
            FileWriter buildXmlWriter =
                    new CBuildScriptWriter(
                            getOutputDirectory(this.codeGenConfiguration.getOutputLocation(),
                                               codeGenConfiguration.getSourceLocation()),
                            this.codeGenConfiguration.getOutputLanguage());
View Full Code Here

Examples of org.geotools.data.shapefile.files.FileWriter

        ShpFiles shpFiles = new ShpFiles("http://somefile.com/shp.shp");

        URL url = shpFiles.acquireRead(DBF, this);
        assertEquals("http://somefile.com/shp.dbf", url.toExternalForm());
        assertEquals(1, shpFiles.numberOfLocks());
        FileWriter testWriter = new FileWriter() {

            public String id() {
                return "Other";
            }
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.